From 9872e40399de3e16a0b5cf875ebf1e57400b685f Mon Sep 17 00:00:00 2001 From: silverpill Date: Sun, 18 Dec 2022 00:48:08 +0000 Subject: [PATCH] Fix clippy warnings --- src/models/profiles/validators.rs | 1 + src/utils/files.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/models/profiles/validators.rs b/src/models/profiles/validators.rs index 57445e9..1fd066f 100644 --- a/src/models/profiles/validators.rs +++ b/src/models/profiles/validators.rs @@ -68,6 +68,7 @@ pub fn clean_extra_fields( }; cleaned_extra_fields.push(field); }; + #[allow(clippy::collapsible_else_if)] if is_remote { if cleaned_extra_fields.len() > 100 { return Err(ValidationError("at most 100 fields are allowed")); diff --git a/src/utils/files.rs b/src/utils/files.rs index db396d1..1aa769b 100644 --- a/src/utils/files.rs +++ b/src/utils/files.rs @@ -62,7 +62,7 @@ pub fn get_file_url(instance_url: &str, file_name: &str) -> String { pub fn remove_files(files: Vec, from_dir: &Path) -> () { for file_name in files { - let file_path = from_dir.join(&file_name); + let file_path = from_dir.join(file_name); let file_path_str = file_path.to_string_lossy(); match remove_file(&file_path) { Ok(_) => log::info!("removed file {}", file_path_str),