diff --git a/crates/ir/src/primitive.rs b/crates/ir/src/primitive.rs index 8b529e3ca1..19362864e8 100644 --- a/crates/ir/src/primitive.rs +++ b/crates/ir/src/primitive.rs @@ -346,7 +346,7 @@ impl ComparatorAndOffset { pub fn as_u64(&self) -> u64 { let hi = self.cmp as u64; let lo = self.offset.to_i32() as u64; - hi << 32 | lo + (hi << 32) | lo } } diff --git a/crates/wasmi/src/linker.rs b/crates/wasmi/src/linker.rs index d0ff6ee8b4..3bb66fb95f 100644 --- a/crates/wasmi/src/linker.rs +++ b/crates/wasmi/src/linker.rs @@ -236,7 +236,7 @@ impl ImportKey { /// Creates a new [`ImportKey`] from the given `module` and `name` symbols. #[inline] pub fn new(module: Symbol, name: Symbol) -> Self { - let module_and_name = u64::from(module.into_u32()) << 32 | u64::from(name.into_u32()); + let module_and_name = (u64::from(module.into_u32()) << 32) | u64::from(name.into_u32()); Self { module_and_name } } diff --git a/crates/wasmi/src/module/read.rs b/crates/wasmi/src/module/read.rs index 6d25d204f8..992b2e4ff5 100644 --- a/crates/wasmi/src/module/read.rs +++ b/crates/wasmi/src/module/read.rs @@ -62,7 +62,7 @@ where } #[cfg(not(feature = "std"))] -impl<'a> Read for &'a [u8] { +impl Read for &[u8] { fn read(&mut self, buffer: &mut [u8]) -> Result { let len_copy = self.len().min(buffer.len()); let (read, rest) = self.split_at(len_copy);