MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / words

Function words

atomic-core/src/pristine/span_patch_storage.rs:39–41  ·  view source on GitHub ↗
(values: [u64; N])

Source from the content-addressed store, hash-verified

37}
38
39fn words<const N: usize>(values: [u64; N]) -> Vec<u8> {
40 values.into_iter().flat_map(u64::to_be_bytes).collect()
41}
42
43fn decode_words<const N: usize>(bytes: &[u8]) -> [u64; N] {
44 std::array::from_fn(|i| u64::from_be_bytes(bytes[i * 8..i * 8 + 8].try_into().unwrap()))

Callers 3

span_keyFunction · 0.85
index_changeFunction · 0.85

Calls 2

collectMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected