Skip to content

Commit

Permalink
rune: Clean up binary operations
Browse files Browse the repository at this point in the history
  • Loading branch information
udoprog committed Nov 3, 2024
1 parent 7255277 commit adcd715
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 274 deletions.
10 changes: 0 additions & 10 deletions crates/rune/src/runtime/hasher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ impl Hasher {
self.hasher.write(string.as_bytes());
}

/// Hash an 64-bit float.
///
/// You should ensure that the float is normal per the [`f64::is_normal`]
/// function before hashing it, since otherwise equality tests against the
/// float won't work as intended. Otherwise, know what you're doing.
pub(crate) fn write_f64(&mut self, value: f64) {
let bits = value.to_bits();
self.hasher.write_u64(bits);
}

/// Construct a hash.
pub fn finish(&self) -> u64 {
self.hasher.finish()
Expand Down
Loading

0 comments on commit adcd715

Please sign in to comment.