Skip to content
Unverified Commit 34369e2d authored by Zelda Hessler's avatar Zelda Hessler Committed by GitHub
Browse files

Update `FsBuilder`-based `ByteStreams` to support file offsets (#1361)

* add: offset setter to FsBuilder
remove: file_size setter from FsBuilder
add: length setter to FsBuilder
add: test for ByteStream w/ offset
add: test for ByteStream w/ length less than file size
update: path_based_bytestreams_with_builder test

* add: test ensuring offset and length work correctly together
add: test ensuring that no data is returned when offset is greater than file size
add: test ensuring that nothing breaks if length to read is larger than file size

* add: chunking test
add: CHANGELOG.next.toml entry
refactor: new code based on PR comments

* remove: unused use statement

* refactor: length API

* update: prefer unwrap() to returning error in tests

* update: prefer unwrap() to returning error in tests
add: test for Length::Exact behavior

* update: error if offset is greater than file length

* fix: test to work with new offset error

* update: error test to be more specific
parent 45323f74
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment