Skip to content

Commit

Permalink
Inline
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Aug 23, 2023
1 parent 07b7600 commit da78da5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ impl SipHasher {
}

/// Hash a byte array - This is the easiest and safest way to use SipHash.
#[inline]
pub fn hash(&self, bytes: &[u8]) -> u64 {
let mut hasher = self.0.hasher;
hasher.write(bytes);
Expand Down Expand Up @@ -228,6 +229,7 @@ impl SipHasher13 {
}

/// Hash a byte array - This is the easiest and safest way to use SipHash.
#[inline]
pub fn hash(&self, bytes: &[u8]) -> u64 {
let mut hasher = self.hasher;
hasher.write(bytes);
Expand Down Expand Up @@ -275,6 +277,7 @@ impl SipHasher24 {
}

/// Hash a byte array - This is the easiest and safest way to use SipHash.
#[inline]
pub fn hash(&self, bytes: &[u8]) -> u64 {
let mut hasher = self.hasher;
hasher.write(bytes);
Expand Down
3 changes: 3 additions & 0 deletions src/sip128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ impl SipHasher {
}

/// Hash a byte array - This is the easiest and safest way to use SipHash.
#[inline]
pub fn hash(&self, bytes: &[u8]) -> Hash128 {
let mut hasher = self.0.hasher;
hasher.write(bytes);
Expand Down Expand Up @@ -257,6 +258,7 @@ impl SipHasher13 {
}

/// Hash a byte array - This is the easiest and safest way to use SipHash.
#[inline]
pub fn hash(&self, bytes: &[u8]) -> Hash128 {
let mut hasher = self.hasher;
hasher.write(bytes);
Expand Down Expand Up @@ -312,6 +314,7 @@ impl SipHasher24 {
}

/// Hash a byte array - This is the easiest and safest way to use SipHash.
#[inline]
pub fn hash(&self, bytes: &[u8]) -> Hash128 {
let mut hasher = self.hasher;
hasher.write(bytes);
Expand Down

0 comments on commit da78da5

Please sign in to comment.