diff --git a/yazi-config/src/popup/confirm.rs b/yazi-config/src/popup/confirm.rs index 3e86fddc..7874671a 100644 --- a/yazi-config/src/popup/confirm.rs +++ b/yazi-config/src/popup/confirm.rs @@ -22,12 +22,12 @@ pub struct Confirm { pub overwrite_offset: Offset, // quit - pub quit_title: String, - pub quit_content: String, - pub quit_origin: Origin, - pub quit_offset: Offset, + pub quit_title: String, + pub quit_content: String, + pub quit_origin: Origin, + pub quit_offset: Offset, // bulk rename - pub bulk_rename_title: String, + pub bulk_rename_title: String, pub bulk_rename_origin: Origin, pub bulk_rename_offset: Offset, } diff --git a/yazi-core/src/mgr/commands/bulk_rename.rs b/yazi-core/src/mgr/commands/bulk_rename.rs index 1dd45034..ce4d4ad2 100644 --- a/yazi-core/src/mgr/commands/bulk_rename.rs +++ b/yazi-core/src/mgr/commands/bulk_rename.rs @@ -1,17 +1,8 @@ -use std::{ - borrow::Cow, - collections::HashMap, - ffi::{OsStr, OsString}, - path::PathBuf, - sync::Arc, -}; +use std::{borrow::Cow, collections::HashMap, ffi::{OsStr, OsString}, path::PathBuf, sync::Arc}; use anyhow::Result; use scopeguard::defer; -use tokio::{ - fs::{self, OpenOptions}, - io::AsyncWriteExt, -}; +use tokio::{fs::{self, OpenOptions}, io::AsyncWriteExt}; use yazi_config::{YAZI, popup::ConfirmCfg}; use yazi_fs::max_common_root; use yazi_proxy::{AppProxy, ConfirmProxy, TasksProxy}; @@ -43,11 +34,10 @@ impl Mgr { .await?; defer! { tokio::spawn(fs::remove_file(tmp.clone())); } - TasksProxy::process_exec( - Cow::Borrowed(opener), - cwd, - vec![OsString::new(), tmp.to_owned().into()], - ) + TasksProxy::process_exec(Cow::Borrowed(opener), cwd, vec![ + OsString::new(), + tmp.to_owned().into(), + ]) .await; let new: Vec<_> = diff --git a/yazi-core/src/tasks/tasks.rs b/yazi-core/src/tasks/tasks.rs index 8138b0e9..bc3fe1cb 100644 --- a/yazi-core/src/tasks/tasks.rs +++ b/yazi-core/src/tasks/tasks.rs @@ -11,7 +11,7 @@ use super::{TASKS_BORDER, TASKS_PADDING, TASKS_PERCENT, TasksProgress}; pub struct Tasks { pub scheduler: Arc, - handle: JoinHandle<()>, + handle: JoinHandle<()>, pub visible: bool, pub cursor: usize, diff --git a/yazi-scheduler/src/file/file.rs b/yazi-scheduler/src/file/file.rs index a08bb61b..7c4206bb 100644 --- a/yazi-scheduler/src/file/file.rs +++ b/yazi-scheduler/src/file/file.rs @@ -4,15 +4,10 @@ use anyhow::{Result, anyhow}; use tokio::{fs::{self, DirEntry}, io::{self, ErrorKind::{AlreadyExists, NotFound}}, sync::mpsc}; use tracing::warn; use yazi_config::YAZI; -use yazi_fs::{ - SizeCalculator, cha::Cha, copy_with_progress, maybe_exists, ok_or_not_found, path_relative_to, - paths_to_same_file, skip_path, -}; +use yazi_fs::{SizeCalculator, cha::Cha, copy_with_progress, maybe_exists, ok_or_not_found, path_relative_to, paths_to_same_file, skip_path}; use yazi_shared::url::Url; -use super::{ - FileOp, FileOpDelete, FileOpHardlink, FileOpLink, FileOpPaste, FileOpRename, FileOpTrash, -}; +use super::{FileOp, FileOpDelete, FileOpHardlink, FileOpLink, FileOpPaste, FileOpRename, FileOpTrash}; use crate::{LOW, NORMAL, TaskOp, TaskProg}; pub struct File { diff --git a/yazi-scheduler/src/file/op.rs b/yazi-scheduler/src/file/op.rs index a6e165a1..757ac8f2 100644 --- a/yazi-scheduler/src/file/op.rs +++ b/yazi-scheduler/src/file/op.rs @@ -110,7 +110,7 @@ pub struct FileOpTrash { // --- Rename #[derive(Clone, Debug)] pub struct FileOpRename { - pub id: usize, + pub id: usize, pub from: Url, - pub to: Url, + pub to: Url, } diff --git a/yazi-scheduler/src/scheduler.rs b/yazi-scheduler/src/scheduler.rs index d1be3e2a..6b3e9fa6 100644 --- a/yazi-scheduler/src/scheduler.rs +++ b/yazi-scheduler/src/scheduler.rs @@ -11,7 +11,7 @@ use yazi_proxy::{MgrProxy, options::{PluginOpt, ProcessExecOpt}}; use yazi_shared::{Throttle, url::Url}; use super::{Ongoing, TaskProg, TaskStage}; -use crate::{file::{File, FileOpDelete, FileOpHardlink, FileOpLink, FileOpPaste, FileOpRename, FileOpTrash}, plugin::{Plugin, PluginOpEntry}, prework::{Prework, PreworkOpFetch, PreworkOpLoad, PreworkOpSize}, process::{Process, ProcessOpBg, ProcessOpBlock, ProcessOpOrphan}, TaskKind, TaskOp, HIGH, LOW, NORMAL}; +use crate::{HIGH, LOW, NORMAL, TaskKind, TaskOp, file::{File, FileOpDelete, FileOpHardlink, FileOpLink, FileOpPaste, FileOpRename, FileOpTrash}, plugin::{Plugin, PluginOpEntry}, prework::{Prework, PreworkOpFetch, PreworkOpLoad, PreworkOpSize}, process::{Process, ProcessOpBg, ProcessOpBlock, ProcessOpOrphan}}; pub struct Scheduler { pub file: Arc,