MCPcopy Create free account
hub / github.com/Vectorized/function-selector-miner / fill_and_get_name

Method fill_and_get_name

src/sponge.rs:38–48  ·  view source on GitHub ↗
(
        &mut self,
        function_name: &SmallString,
        nonce: u64,
        function_params: &SmallString,
    )

Source from the content-addressed store, hash-verified

36 /// This function is unsafe because it writes to a union type.
37 #[inline(always)]
38 pub unsafe fn fill_and_get_name<const N: usize>(
39 &mut self,
40 function_name: &SmallString,
41 nonce: u64,
42 function_params: &SmallString,
43 ) -> String {
44 let o = self.fill_sponge::<N>(function_name, nonce, function_params);
45 self.chars[o] = 0x00;
46
47 str::from_utf8_unchecked(&self.chars[..o]).to_owned()
48 }
49
50 /// # Safety
51 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected