MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / to_bytes_roundtrip

Function to_bytes_roundtrip

nodedb-array/src/sync/hlc.rs:285–290  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

283
284 #[test]
285 fn to_bytes_roundtrip() {
286 let hlc = Hlc::new(123_456_789, 7, ReplicaId::new(0xabcd)).unwrap();
287 let bytes = hlc.to_bytes();
288 let back = Hlc::from_bytes(&bytes);
289 assert_eq!(hlc, back);
290 }
291
292 #[test]
293 fn byte_order_matches_lexicographic() {

Callers

nothing calls this directly

Calls 1

to_bytesMethod · 0.45

Tested by

no test coverage detected