From 0ea009cfdc2a44eeca85925c28ecf30ba2ce8a94 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sun, 24 Apr 2022 19:49:22 -0300 Subject: [PATCH] chore(lint): fix warnings --- core/tauri/src/lib.rs | 6 ++---- core/tauri/src/manager.rs | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index e8731edf2..dc5ad743b 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -813,9 +813,7 @@ mod tests { fn get_manifest() -> &'static Manifest { MANIFEST.get_or_init(|| { let manifest_dir = PathBuf::from(var("CARGO_MANIFEST_DIR").unwrap()); - let manifest = Manifest::from_path(manifest_dir.join("Cargo.toml")) - .expect("failed to parse Cargo manifest"); - manifest + Manifest::from_path(manifest_dir.join("Cargo.toml")).expect("failed to parse Cargo manifest") }) } @@ -824,7 +822,7 @@ mod tests { let manifest_dir = PathBuf::from(var("CARGO_MANIFEST_DIR").unwrap()); let lib_code = read_to_string(manifest_dir.join("src/lib.rs")).expect("failed to read lib.rs"); - for (f, _) in &get_manifest().features { + for f in get_manifest().features.keys() { if !(f.starts_with("__") || f == "default" || lib_code.contains(&format!("*{}**", f))) { panic!("Feature {} is not documented", f); } diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index ddef57b5f..e6b26620e 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -1390,6 +1390,7 @@ mod tests { #[test] fn string_replace_with_callback() { let mut tauri_index = 0; + #[allow(clippy::single_element_loop)] for (src, pattern, replacement, result) in [( "tauri is awesome, tauri is amazing", "tauri",