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

Method pos

sponge-cursor/src/lib.rs:65–74  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

63 #[must_use]
64 #[inline(always)]
65 pub fn pos(&self) -> usize {
66 let pos = usize::from(self.pos);
67 debug_assert!(pos < RATE);
68 if pos < RATE {
69 pos
70 } else {
71 // SAFETY: the type enforces that `pos` is always smaller than `RATE`
72 unsafe { core::hint::unreachable_unchecked() };
73 }
74 }
75
76 /// Set new cursor position.
77 ///

Callers 2

absorb_u64_leMethod · 0.80
squeeze_inner_u64_leMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected