diff --git a/lib/src/content_hash.rs b/lib/src/content_hash.rs index 9f9dfc3734..e50a0498a5 100644 --- a/lib/src/content_hash.rs +++ b/lib/src/content_hash.rs @@ -39,12 +39,24 @@ impl ContentHash for u8 { } } +impl ContentHash for u32 { + fn hash(&self, state: &mut impl digest::Update) { + state.update(&self.to_le_bytes()); + } +} + impl ContentHash for i32 { fn hash(&self, state: &mut impl digest::Update) { state.update(&self.to_le_bytes()); } } +impl ContentHash for u64 { + fn hash(&self, state: &mut impl digest::Update) { + state.update(&self.to_le_bytes()); + } +} + impl ContentHash for i64 { fn hash(&self, state: &mut impl digest::Update) { state.update(&self.to_le_bytes());