File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,8 +95,7 @@ impl<BS: ArraySize> ReadBuffer<BS> {
9595
9696 /// Write new block and consume `read_len` bytes from it.
9797 ///
98- /// If `read_len` is equal to zero, sets buffer to the exhausted state (i.e. it sets the cursor
99- /// position to block size) and immediately returns without calling the closures.
98+ /// If `read_len` is equal to zero, immediately returns without calling the closures.
10099 /// Otherwise, the method calls `gen_block` to fill the internal buffer,
101100 /// passes to `read_fn` slice with first `read_len` bytes of the block,
102101 /// and sets the cursor position to `read_len`.
@@ -111,7 +110,6 @@ impl<BS: ArraySize> ReadBuffer<BS> {
111110 read_fn : impl FnOnce ( & [ u8 ] ) ,
112111 ) {
113112 if read_len == 0 {
114- unsafe { self . set_pos_unchecked ( BS :: USIZE ) } ;
115113 return ;
116114 }
117115 assert ! ( read_len < BS :: USIZE ) ;
You can’t perform that action at this time.
0 commit comments