Fix clippy warnings
This commit is contained in:
parent
2b8063990a
commit
9872e40399
2 changed files with 2 additions and 1 deletions
|
@ -68,6 +68,7 @@ pub fn clean_extra_fields(
|
||||||
};
|
};
|
||||||
cleaned_extra_fields.push(field);
|
cleaned_extra_fields.push(field);
|
||||||
};
|
};
|
||||||
|
#[allow(clippy::collapsible_else_if)]
|
||||||
if is_remote {
|
if is_remote {
|
||||||
if cleaned_extra_fields.len() > 100 {
|
if cleaned_extra_fields.len() > 100 {
|
||||||
return Err(ValidationError("at most 100 fields are allowed"));
|
return Err(ValidationError("at most 100 fields are allowed"));
|
||||||
|
|
|
@ -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) -> () {
|
pub fn remove_files(files: Vec<String>, from_dir: &Path) -> () {
|
||||||
for file_name in files {
|
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();
|
let file_path_str = file_path.to_string_lossy();
|
||||||
match remove_file(&file_path) {
|
match remove_file(&file_path) {
|
||||||
Ok(_) => log::info!("removed file {}", file_path_str),
|
Ok(_) => log::info!("removed file {}", file_path_str),
|
||||||
|
|
Loading…
Reference in a new issue