MCPcopy Create free account
hub / github.com/RustCrypto/utils / set_pos_unchecked

Method set_pos_unchecked

block-buffer/src/read.rs:72–75  ·  view source on GitHub ↗
(&mut self, pos: usize)

Source from the content-addressed store, hash-verified

70 #[inline(always)]
71 #[allow(clippy::cast_possible_truncation)]
72 unsafe fn set_pos_unchecked(&mut self, pos: usize) {
73 debug_assert!(pos != 0 && pos <= BS::USIZE);
74 self.buffer[0] = pos as u8;
75 }
76
77 /// Read up to `len` bytes of remaining data in the buffer.
78 ///

Callers 3

defaultMethod · 0.45
read_cachedMethod · 0.45
write_blockMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected