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

Function put_timestamp

atomic-core/src/pristine/file_index_v2.rs:368–373  ·  view source on GitHub ↗
(dst: &mut [u8], value: Option<FileIndexTimestamp>)

Source from the content-addressed store, hash-verified

366 }
367}
368fn put_timestamp(dst: &mut [u8], value: Option<FileIndexTimestamp>) {
369 if let Some(value) = value {
370 dst[..8].copy_from_slice(&value.seconds.to_le_bytes());
371 dst[8..].copy_from_slice(&value.nanoseconds.to_le_bytes());
372 }
373}
374fn put_hash(dst: &mut [u8], value: Option<&Hash>) {
375 if let Some(value) = value {
376 dst.copy_from_slice(&value.0);

Callers 1

encode_file_index_v2Function · 0.85

Calls 1

to_le_bytesMethod · 0.80

Tested by

no test coverage detected