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