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 4aeeac0 commit b2e2a64Copy full SHA for b2e2a64
src/storage/ring_buffer.rs
@@ -659,13 +659,13 @@ mod test {
659
ring.dequeue_many(6).copy_from_slice(b"ABCDEF");
660
661
assert_eq!(ring.write_unallocated(0, b"ghi"), 3);
662
- assert_eq!(&ring.storage[..], b"ABCDEFghi...");
+ assert_eq!(ring.get_unallocated(0, 3), b"ghi");
663
664
assert_eq!(ring.write_unallocated(3, b"jklmno"), 6);
665
- assert_eq!(&ring.storage[..], b"mnoDEFghijkl");
+ assert_eq!(ring.get_unallocated(3, 3), b"jkl");
666
667
assert_eq!(ring.write_unallocated(9, b"pqrstu"), 3);
668
- assert_eq!(&ring.storage[..], b"mnopqrghijkl");
+ assert_eq!(ring.get_unallocated(9, 3), b"pqr");
669
}
670
671
#[test]
0 commit comments