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

Method new

src/small_string.rs:7–15  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

5
6impl SmallString {
7 pub fn new(s: &str) -> SmallString {
8 let bytes = s.as_bytes();
9 let mut data = [0u8; 128];
10 data[..bytes.len()].copy_from_slice(bytes);
11 SmallString {
12 data,
13 length: bytes.len(),
14 }
15 }
16}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected