Fix clippy warnings

This commit is contained in:
silverpill 2022-12-18 00:48:08 +00:00
parent 2b8063990a
commit 9872e40399
2 changed files with 2 additions and 1 deletions

View file

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

View file

@ -62,7 +62,7 @@ pub fn get_file_url(instance_url: &str, file_name: &str) -> String {
pub fn remove_files(files: Vec<String>, 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),