Skip to content

Addressed clippy warnings #4447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/closure.rs
Original file line number Diff line number Diff line change
@@ -599,7 +599,7 @@ macro_rules! doit {

inform(invoke::<$($var,)* R> as usize as u32);

unsafe extern fn destroy<$($var: FromWasmAbi,)* R: ReturnWasmAbi>(
unsafe extern "C" fn destroy<$($var: FromWasmAbi,)* R: ReturnWasmAbi>(
a: usize,
b: usize,
) {
@@ -660,7 +660,7 @@ macro_rules! doit {

inform(invoke::<$($var,)* R> as usize as u32);

unsafe extern fn destroy<$($var: FromWasmAbi,)* R: ReturnWasmAbi>(
unsafe extern "C" fn destroy<$($var: FromWasmAbi,)* R: ReturnWasmAbi>(
a: usize,
b: usize,
) {
4 changes: 2 additions & 2 deletions src/convert/impls.rs
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ impl WasmAbi for i128 {

#[inline]
fn join(low: u64, high: u64, _: (), _: ()) -> Self {
((high as u128) << 64 | low as u128) as i128
(((high as u128) << 64) | low as u128) as i128
}
}
impl WasmAbi for u128 {
@@ -62,7 +62,7 @@ impl WasmAbi for u128 {

#[inline]
fn join(low: u64, high: u64, _: (), _: ()) -> Self {
(high as u128) << 64 | low as u128
((high as u128) << 64) | low as u128
}
}

2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -84,7 +84,7 @@ macro_rules! externs {
$(
#[cfg(not(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))))]
#[allow(unused_variables)]
unsafe extern fn $name($($args)*) -> $ret {
unsafe extern "C" fn $name($($args)*) -> $ret {
panic!("function not implemented on non-wasm32 targets")
}
)*

Unchanged files with check annotations Beta

}
}
fn internal_error(msg: &str) -> ! {

Check warning on line 101 in src/externref.rs

GitHub Actions / Build and test the deno example

unused variable: `msg`
cfg_if::cfg_if! {
if #[cfg(debug_assertions)] {
super::throw_str(msg)