We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53bbcd4 commit 8ed1c5cCopy full SHA for 8ed1c5c
examples/list.rs
@@ -79,7 +79,7 @@ impl Storage for FileStorage {
79
const BLOCK_COUNT: usize = BLOCK_COUNT;
80
81
fn read(&mut self, off: usize, buf: &mut [u8]) -> Result<usize> {
82
- assert!(off + buf.len() < BLOCK_SIZE * BLOCK_COUNT);
+ assert!(off + buf.len() <= BLOCK_SIZE * BLOCK_COUNT);
83
if off >= self.len {
84
// blocks that are not in the file are assumed to be empty
85
buf.iter_mut().for_each(|byte| *byte = 0);
0 commit comments