diff options
Diffstat (limited to 'vendor/gix-object/src/data.rs')
-rw-r--r-- | vendor/gix-object/src/data.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/gix-object/src/data.rs b/vendor/gix-object/src/data.rs index e66360357..cea807684 100644 --- a/vendor/gix-object/src/data.rs +++ b/vendor/gix-object/src/data.rs @@ -67,8 +67,7 @@ pub mod verify { /// Compute the checksum of `self` and compare it with the `desired` hash. /// If the hashes do not match, an [`Error`] is returned, containing the actual /// hash of `self`. - pub fn verify_checksum(&self, desired: impl AsRef<gix_hash::oid>) -> Result<(), Error> { - let desired = desired.as_ref(); + pub fn verify_checksum(&self, desired: &gix_hash::oid) -> Result<(), Error> { let actual_id = crate::compute_hash(desired.kind(), self.kind, self.data); if desired != actual_id { return Err(Error::ChecksumMismatch { @@ -87,6 +86,9 @@ mod tests { #[test] fn size_of_object() { + #[cfg(target_pointer_width = "64")] assert_eq!(std::mem::size_of::<Data<'_>>(), 24, "this shouldn't change unnoticed"); + #[cfg(target_pointer_width = "32")] + assert_eq!(std::mem::size_of::<Data<'_>>(), 12, "this shouldn't change unnoticed"); } } |