category |
description |
I/O |
Prefer read_write_at - read_at/write_at with &self |
Offset read_at/write_at with &self
Pros:
- No runtime dependencies
read_at(&self, ...)
Cons:
BufOffsetReader
is a bit kludgy - u64 as usize
casts should probably Err
instead
- Implementing traits directly on
File
makes for inconsistent seek behavior when used by reference
References:
github,
docs.rs,
lib.rs,
crates.io
version |
thoroughness |
understanding |
rating |
notes |
0.6.0 |
high |
high |
✔️ positive |
size -> usize |
0.5.0 |
high |
high |
✔️ positive |
offset + size -> u64 |
0.4.0 |
high |
high |
✔️ positive |
BufOffsetReader owns R |
0.3.0 |
high |
high |
✔️ positive |
OffsetRead for &[u8] |
0.2.0 |
high |
high |
✔️ positive |
+OffsetWrite |
0.1.1 |
high |
high |
✔️ positive |
|
0.1.0 |
high |
high |
✔️ positive |
+OffsetRead |
Diff |
Rating |
Notes |
src\lib.rs |
✔️ |
size u64 -> usize |
Diff |
Rating |
Notes |
benches\bench.rs |
✔️ |
offset + size usize -> u64 |
src\lib.rs |
✔️ |
offset + size usize -> u64 |
Diff |
Rating |
Notes |
README.md |
✔️ |
Trivial |
benches\bench.rs |
✔️ |
|
src\lib.rs |
✔️ |
BufOffsetReader now owns R |
TIL:
Diff |
Rating |
Notes |
src\lib.rs |
✔️ |
OffsetRead for &[u8] , tests |
Diff |
Rating |
Notes |
README.md |
✔️ |
Whitespace |
src\lib.rs |
✔️ |
clear for BufOffsetReader, OffsetWrite |
Diff |
Rating |
Notes |
Cargo.toml |
✔️ |
docs, readme, travis badge, exclude .travis.yml |
Cargo.toml.orig |
✔️ |
docs, readme, travis badge, exclude .travis.yml |
README.md |
✔️ |
Fleshed out much more, badge links |
src\lib.rs |
✔️ |
Saner parens |
Full Review
File |
Rating |
Notes |
.cargo-ok |
✔️ |
|
.cargo_vcs_info.json |
✔️ |
|
.gitignore |
✔️ |
|
Cargo.toml |
✔️ |
MIT OR Apache-2.0 |
Cargo.toml.orig |
✔️ |
MIT OR Apache-2.0 |
LICENSE-APACHE |
✔️ |
Apache-2.0 |
LICENSE-MIT |
✔️ |
MIT |
README.md |
✔️ |
Minimal |
benches\bench.rs |
⚠️ |
make_temp_file should use write_all ? |
src\lib.rs |
✔️ |
|
src\range.rs |
✔️ |
Could use better docs |
Other |
Rating |
Notes |
unsafe |
✔️ |
None |
fs |
✔️ |
No path manipulation, just safe std stuff |
io |
✔️ |
Safe/sane |
docs |
✔️ |
|
tests |
✔️❔⚠️❗❌ |
|
Line |
Notes |
78 |
⚠️ Could self.buffer be partially read with a stale self.range ? |
83 |
Assumes self.contains(r) |
92 |
✔️ impl OffsetReadMut for BufOffsetReader - awkwardly coded but correct |
110 |
✔️ impl OffsetRead for File |
127 |
Skimmed tests |