diff --git a/hashes/src/siphash24.rs b/hashes/src/siphash24.rs index 30d2c844eb..5ffd8a89f4 100644 --- a/hashes/src/siphash24.rs +++ b/hashes/src/siphash24.rs @@ -203,7 +203,11 @@ impl Hash { } /// Returns the (little endian) 64-bit integer representation of the hash value. - pub fn to_u64(&self) -> u64 { u64::from_le_bytes(self.0) } + #[deprecated(since = "TBD", note = "use `to_u64` instead")] + pub fn as_u64(&self) -> u64 { self.to_u64() } + + /// Returns the (little endian) 64-bit integer representation of the hash value. + pub fn to_u64(self) -> u64 { u64::from_le_bytes(self.0) } /// Creates a hash from its (little endian) 64-bit integer representation. pub fn from_u64(hash: u64) -> Hash { Hash(hash.to_le_bytes()) }