Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
silwol committed Aug 5, 2022
1 parent 9c7b434 commit a6022af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/api/src/sys/externals/memory_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl<'a> MemoryView<'a> {
}

pub(crate) fn buffer(&'a self) -> MemoryBuffer<'a> {
self.buffer.clone()
self.buffer
}

/// Safely reads bytes from the memory at the given offset.
Expand Down
2 changes: 1 addition & 1 deletion lib/api/src/sys/mem_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<'a, T: ValueType> WasmRef<'a, T> {
#[inline]
pub fn new(view: &'a MemoryView, offset: u64) -> Self {
Self {
buffer: view.buffer.clone(),
buffer: view.buffer,
offset,
marker: PhantomData,
}
Expand Down
2 changes: 1 addition & 1 deletion lib/emscripten/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ pub unsafe fn copy_stat_into_wasm(ctx: FunctionEnvMut<EmEnv>, buf: u32, stat: &s
#[allow(dead_code)] // it's used in `env/windows/mod.rs`.
pub fn read_string_from_wasm(memory: &MemoryView, offset: u32) -> String {
WasmPtr::<u8>::new(offset)
.read_utf8_string_with_nul(&memory)
.read_utf8_string_with_nul(memory)
.unwrap()
}

Expand Down

0 comments on commit a6022af

Please sign in to comment.