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

Function legacy_v1_fixture_bytes

atomic-core/src/change/change.rs:1281–1291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1279 }
1280
1281 fn legacy_v1_fixture_bytes() -> Vec<u8> {
1282 let hex: String = include_str!("format_v3/fixtures/cb_fmt1_legacy_v1_object.hex")
1283 .chars()
1284 .filter(|character| !character.is_ascii_whitespace())
1285 .collect();
1286 assert_eq!(hex.len() % 2, 0);
1287 (0..hex.len())
1288 .step_by(2)
1289 .map(|index| u8::from_str_radix(&hex[index..index + 2], 16).unwrap())
1290 .collect()
1291 }
1292
1293 // HashedChange Tests
1294

Calls 3

collectMethod · 0.45
lenMethod · 0.45
unwrapMethod · 0.45