style: clippy
This commit is contained in:
parent
f90d63ccde
commit
18dc3df5ba
3 changed files with 3 additions and 7 deletions
|
@ -40,11 +40,7 @@ pub struct NapiFnArg {
|
|||
impl NapiFnArg {
|
||||
/// if type was overridden with `#[napi(ts_arg_type = "...")]` use that instead
|
||||
pub fn use_overridden_type_or(&self, default: impl FnOnce() -> String) -> String {
|
||||
self
|
||||
.ts_arg_type
|
||||
.as_ref()
|
||||
.map(|ts| ts.clone())
|
||||
.unwrap_or_else(default)
|
||||
self.ts_arg_type.as_ref().cloned().unwrap_or_else(default)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ pub fn setup() -> Result<(), Error> {
|
|||
let mut dist = path::PathBuf::from(&out_dir);
|
||||
dist.push("libgcc.a");
|
||||
let mut libgcc = fs::File::create(&dist)?;
|
||||
libgcc.write(b"INPUT(-lunwind)")?;
|
||||
let _ = libgcc.write(b"INPUT(-lunwind)")?;
|
||||
drop(libgcc);
|
||||
println!("cargo:rustc-link-search={}", &out_dir);
|
||||
Ok(())
|
||||
|
|
|
@ -7,7 +7,7 @@ pub fn setup() {
|
|||
Ok("macos") => {
|
||||
macos::setup();
|
||||
}
|
||||
Ok("android") => if let Ok(_) = android::setup() {},
|
||||
Ok("android") => if android::setup().is_ok() {},
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue