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

Function read_u16

atomic-core/src/pristine/file_index_v2.rs:384–388  ·  view source on GitHub ↗
(src: &[u8], fields: FileIndexV2Fields, field: FileIndexV2Fields)

Source from the content-addressed store, hash-verified

382 .then(|| u64::from_le_bytes(src.try_into().unwrap()))
383}
384fn read_u16(src: &[u8], fields: FileIndexV2Fields, field: FileIndexV2Fields) -> Option<u16> {
385 fields
386 .contains(field)
387 .then(|| u16::from_le_bytes(src.try_into().unwrap()))
388}
389fn read_timestamp(
390 src: &[u8],
391 fields: FileIndexV2Fields,

Callers 1

decode_file_index_v2Function · 0.85

Calls 2

containsMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected