chore: clippy

This commit is contained in:
Vukašin Vojinović 2026-01-24 17:03:31 +01:00
parent 339e4c104e
commit 1e25e7dd69
11 changed files with 938 additions and 981 deletions

View file

@ -957,10 +957,10 @@ impl Operation {
let dir_name = get_directory_name(file_name);
let mut new_dir = to.join(dir_name);
if new_dir.exists() {
if let Some(new_dir_parent) = new_dir.parent() {
new_dir = copy_unique_path(&new_dir, new_dir_parent);
}
if new_dir.exists()
&& let Some(new_dir_parent) = new_dir.parent()
{
new_dir = copy_unique_path(&new_dir, new_dir_parent);
}
op_sel.ignored.push(path.clone());

View file

@ -138,10 +138,10 @@ impl Context {
}),
is_cleanup: false,
};
if matches!(method, Method::Move { .. }) {
if let Some(cleanup_op) = op.move_cleanup_op() {
cleanup_ops.push(cleanup_op);
}
if matches!(method, Method::Move { .. })
&& let Some(cleanup_op) = op.move_cleanup_op()
{
cleanup_ops.push(cleanup_op);
}
if let Some(parent) = op.to.parent() {
target_dirs.insert(parent.to_path_buf());