Skip to content

Commit

Permalink
Revert unreadable clippy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fschutt committed Jan 18, 2023
1 parent 8183474 commit 35b3747
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
14 changes: 10 additions & 4 deletions lib/compiler-llvm/src/abi/aarch64_systemv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,22 @@ pub struct Aarch64SystemV {}

impl Abi for Aarch64SystemV {
// Given a function definition, retrieve the parameter that is the vmctx pointer.
#[allow(clippy::bool_to_int_with_if)]
fn get_vmctx_ptr_param<'ctx>(&self, func_value: &FunctionValue<'ctx>) -> PointerValue<'ctx> {
func_value
.get_nth_param(u32::from(
func_value
.get_nth_param(
if func_value
.get_enum_attribute(
AttributeLoc::Param(0),
Attribute::get_named_enum_kind_id("sret"),
)
.is_some(),
))
.is_some()
{
1
} else {
0
},
)
.unwrap()
.into_pointer_value()
}
Expand Down
14 changes: 10 additions & 4 deletions lib/compiler-llvm/src/abi/x86_64_systemv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,22 @@ pub struct X86_64SystemV {}

impl Abi for X86_64SystemV {
// Given a function definition, retrieve the parameter that is the vmctx pointer.
#[allow(clippy::bool_to_int_with_if)]
fn get_vmctx_ptr_param<'ctx>(&self, func_value: &FunctionValue<'ctx>) -> PointerValue<'ctx> {
func_value
.get_nth_param(u32::from(
func_value
.get_nth_param(
if func_value
.get_enum_attribute(
AttributeLoc::Param(0),
Attribute::get_named_enum_kind_id("sret"),
)
.is_some(),
))
.is_some()
{
1
} else {
0
},
)
.unwrap()
.into_pointer_value()
}
Expand Down
1 change: 1 addition & 0 deletions tests/lib/wast/src/spectest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use wasmer::*;

/// Return an instance implementing the "spectest" interface used in the
/// spec testsuite.
#[allow(clippy::print_stdout)]
pub fn spectest_importobject(store: &mut Store) -> Imports {
let print = Function::new_typed(store, || {});
let print_i32 = Function::new_typed(store, |val: i32| println!("{}: i32", val));
Expand Down

0 comments on commit 35b3747

Please sign in to comment.