Skip to content

Commit

Permalink
Fix clippy warnings (#1336)
Browse files Browse the repository at this point in the history
* fix clippy warnings

* fix another clippy warning
  • Loading branch information
Robbepop authored Jan 1, 2025
1 parent a37f6b9 commit b2e7429
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/ir/src/primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/wasmi/src/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}

Expand Down
2 changes: 1 addition & 1 deletion crates/wasmi/src/module/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<usize, ReadError> {
let len_copy = self.len().min(buffer.len());
let (read, rest) = self.split_at(len_copy);
Expand Down

0 comments on commit b2e7429

Please sign in to comment.