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 108c5c3 commit 262b84dCopy full SHA for 262b84d
src/imap_stream.rs
@@ -412,13 +412,18 @@ mod tests {
412
// Ask for `i` bytes.
413
buf.ensure_capacity(i).unwrap();
414
415
- // Test that we can read at least as much as requested.
+ // Test that we can read at least 1 byte.
416
let free = buf.free_as_mut_slice();
417
let used = free.len();
418
- assert!(used >= i);
+ assert!(used > 0);
419
420
// Use as much as allowed.
421
buf.extend_used(used);
422
+
423
+ // Test that we can read at least as much as requested.
424
+ let block = buf.take_block();
425
+ assert!(block.len() >= i);
426
+ buf.return_block(block);
427
}
428
429
0 commit comments