chore(lint): fix warnings

This commit is contained in:
Lucas Nogueira
2022-04-24 19:49:22 -03:00
parent bcfed499cf
commit 0ea009cfdc
2 changed files with 3 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -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",