Merge rust-bitcoin/rust-bitcoin#3119: Rename Siphash::as_u64 to Siphash::to_u64
5a91719755
Rename Siphash::as_u64 to Siphash::to_u64 (Shing Him Ng) Pull request description: Resolves #3114 ACKs for top commit: tcharding: However, ACK5a91719755
Kixunil: ACK5a91719755
apoelstra: ACK5a91719755
successfully ran local tests Tree-SHA512: 89b5b8575444e1cef82ba85c633104559923109c9b46026c1293d4776c8d55ea853b84e88acc91ab2fde0d378a0d7bae930ae6981fa8e6c87385dbe1aa083647
This commit is contained in:
commit
8c624be341
|
@ -206,7 +206,7 @@ impl Hash {
|
|||
}
|
||||
|
||||
/// Returns the (little endian) 64-bit integer representation of the hash value.
|
||||
pub fn as_u64(&self) -> u64 { u64::from_le_bytes(self.0) }
|
||||
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()) }
|
||||
|
|
Loading…
Reference in New Issue