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

Function legacy

atomic-core/src/pristine/git_closure.rs:178–184  ·  view source on GitHub ↗
(hashes: &[Hash])

Source from the content-addressed store, hash-verified

176 Hash::of(&n.to_le_bytes())
177 }
178 fn legacy(hashes: &[Hash]) -> Vec<u8> {
179 let mut bytes = (hashes.len() as u32).to_le_bytes().to_vec();
180 for hash in hashes {
181 bytes.extend_from_slice(hash.as_bytes());
182 }
183 bytes
184 }
185
186 #[test]
187 fn exact_order_duplicates_empty_and_divergent_sets_roundtrip() {

Calls 3

to_le_bytesMethod · 0.80
lenMethod · 0.45
as_bytesMethod · 0.45