diff --git a/Cargo.lock b/Cargo.lock index 262b73c86..0a9ce8816 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arbitrary" @@ -157,9 +157,9 @@ dependencies = [ [[package]] name = "hash32" -version = "0.2.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" dependencies = [ "byteorder 1.4.3", ] diff --git a/Cargo.toml b/Cargo.toml index 781ce874a..b88db5089 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ arbitrary = { version = "1.0", optional = true, features = ["derive"] } byteorder = "1.2" combine = "3.8.1" gdbstub = { version = "0.6.2", optional = true } -hash32 = "0.2.0" +hash32 = "0.3.1" log = "0.4.2" rand = { version = "0.8.5", features = ["small_rng"]} rustc-demangle = "0.1" diff --git a/src/ebpf.rs b/src/ebpf.rs index 81d929ef4..4083f2017 100644 --- a/src/ebpf.rs +++ b/src/ebpf.rs @@ -19,8 +19,8 @@ //! the list of the operation codes: use byteorder::{ByteOrder, LittleEndian}; -use hash32::{Hash, Hasher, Murmur3Hasher}; -use std::fmt; +use hash32::{Hasher, Murmur3Hasher}; +use std::{fmt, hash::Hash}; /// Solana BPF version flag pub const EF_SBPF_V2: u32 = 0x20; @@ -656,5 +656,5 @@ pub fn augment_lddw_unchecked(prog: &[u8], insn: &mut Insn) { pub fn hash_symbol_name(name: &[u8]) -> u32 { let mut hasher = Murmur3Hasher::default(); Hash::hash_slice(name, &mut hasher); - hasher.finish() + hasher.finish32() }