Rev to 0.7.0 after updating read & read_and #17

Manually merged
ajmartinez merged 1 commits from update_read into main 2023-01-12 16:54:05 +00:00
Owner

TailedFile::read is public again, and no longer takes a &File
as TailedFile already has a Path that is of use. The method
now checks rotation/truncation, does the read, and returns
Result<Vec<u8>> for users who may just want the bytes.

TailedFile::read_and now calls read and passes the resultant
underlying &[u8] to a user defined function that is its only
argument.

Tests updated accordingly.

Update made after discussion with user Thomas Herzog
<@un9l:matrix.org> in https://matrix.to/#/#staart:txrx.staart.one
on 2023-01-12.

Closes #16

`TailedFile::read` is public again, and no longer takes a `&File` as `TailedFile` already has a `Path` that is of use. The method now checks rotation/truncation, does the read, and returns `Result<Vec<u8>>` for users who may just want the bytes. `TailedFile::read_and` now calls `read` and passes the resultant underlying `&[u8]` to a user defined function that is its only argument. Tests updated accordingly. Update made after discussion with user Thomas Herzog <@un9l:matrix.org> in https://matrix.to/#/#staart:txrx.staart.one on 2023-01-12. Closes #16
ajmartinez added 1 commit 2023-01-12 16:52:40 +00:00
c8b172de6e
Rev to 0.7.0 after updating read & read_and
`TailedFile::read` is public again, and no longer takes a `&File`
as `TailedFile` already has a `Path` that is of use. The method
now checks rotation/truncation, does the read, and returns
`Result<Vec<u8>>` for users who may just want the bytes.

`TailedFile::read_and` now calls `read` and passes the resultant
underlying `&[u8]` to a user defined function that is its only
argument.

Tests updated accordingly.

Update made after discussion with user Thomas Herzog
<@un9l:matrix.org> in https://matrix.to/#/#staart:txrx.staart.one
on 2023-01-12.
ajmartinez manually merged commit c8b172de6e into main 2023-01-12 16:54:05 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ajmartinez/staart#17
No description provided.