Skip to content

Commit 36651b1

Browse files
committed
Replace hash_u64 with hash_u8
1 parent 140dc0b commit 36651b1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ impl PythonBindGenerator {
10851085

10861086
fn generate_enum_hash_method(&mut self) {
10871087
self.write_str(" pub fn __hash__(&self) -> u64 {");
1088-
self.write_str(" crate::hash_u64(*self as u64)");
1088+
self.write_str(" crate::hash_u8(*self as u8)");
10891089
self.write_str(" }");
10901090
}
10911091

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub fn flat_err_to_py(err: flatbuffers::InvalidFlatbuffer) -> PyErr {
2828
InvalidFlatbuffer::new_err(err_msg)
2929
}
3030

31-
pub fn hash_u64(num: u64) -> u64 {
31+
pub fn hash_u8(num: u8) -> u64 {
3232
let mut hasher = DefaultHasher::new();
3333
num.hash(&mut hasher);
3434
hasher.finish()

0 commit comments

Comments
 (0)