mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 14:51:03 +00:00
refactor: make Clippy happy
This commit is contained in:
parent
8c2a6dba90
commit
0b8aaba29b
33 changed files with 108 additions and 118 deletions
48
Cargo.lock
generated
48
Cargo.lock
generated
|
|
@ -505,9 +505,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.47"
|
||||
version = "1.2.48"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd405d82c84ff7f35739f175f67d8b9fb7687a0e84ccdc78bd3568839827cf07"
|
||||
checksum = "c481bdbf0ed3b892f6f806287d72acd515b352a4ec27a208489b8c1bc839633a"
|
||||
dependencies = [
|
||||
"find-msvc-tools",
|
||||
"jobserver",
|
||||
|
|
@ -1856,9 +1856,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.82"
|
||||
version = "0.3.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65"
|
||||
checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"wasm-bindgen",
|
||||
|
|
@ -2173,9 +2173,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "moxcms"
|
||||
version = "0.7.9"
|
||||
version = "0.7.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fbdd3d7436f8b5e892b8b7ea114271ff0fa00bc5acae845d53b07d498616ef6"
|
||||
checksum = "80986bbbcf925ebd3be54c26613d861255284584501595cf418320c078945608"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
"pxfm",
|
||||
|
|
@ -2798,9 +2798,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "pxfm"
|
||||
version = "0.1.25"
|
||||
version = "0.1.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a3cbdf373972bf78df4d3b518d07003938e2c7d1fb5891e55f9cb6df57009d84"
|
||||
checksum = "b3502d6155304a4173a5f2c34b52b7ed0dd085890326cb50fd625fdf39e86b3b"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
|
@ -3865,9 +3865,9 @@ checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2"
|
|||
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.41"
|
||||
version = "0.1.43"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
|
||||
checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647"
|
||||
dependencies = [
|
||||
"pin-project-lite",
|
||||
"tracing-attributes",
|
||||
|
|
@ -3920,9 +3920,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.3.20"
|
||||
version = "0.3.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5"
|
||||
checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
|
||||
dependencies = [
|
||||
"matchers",
|
||||
"nu-ansi-term",
|
||||
|
|
@ -4154,9 +4154,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.105"
|
||||
version = "0.2.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60"
|
||||
checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
|
|
@ -4167,9 +4167,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-futures"
|
||||
version = "0.4.55"
|
||||
version = "0.4.56"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0"
|
||||
checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
|
|
@ -4180,9 +4180,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.105"
|
||||
version = "0.2.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2"
|
||||
checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
|
|
@ -4190,9 +4190,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.105"
|
||||
version = "0.2.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc"
|
||||
checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"proc-macro2",
|
||||
|
|
@ -4203,18 +4203,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.105"
|
||||
version = "0.2.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76"
|
||||
checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.82"
|
||||
version = "0.3.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1"
|
||||
checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ tokio = { version = "1.48.0", features = [ "full" ] }
|
|||
tokio-stream = "0.1.17"
|
||||
tokio-util = "0.7.17"
|
||||
toml = { version = "0.9.8" }
|
||||
tracing = { version = "0.1.41", features = [ "max_level_debug", "release_max_level_debug" ] }
|
||||
tracing = { version = "0.1.43", features = [ "max_level_debug", "release_max_level_debug" ] }
|
||||
twox-hash = { version = "2.1.2", default-features = false, features = [ "std", "random", "xxhash3_128" ] }
|
||||
typed-path = "0.12.0"
|
||||
unicode-width = { version = "0.2.0", default-features = false }
|
||||
|
|
@ -67,5 +67,6 @@ implicit_clone = "warn"
|
|||
len_without_is_empty = "allow"
|
||||
missing_safety_doc = "allow"
|
||||
module_inception = "allow"
|
||||
option_map_unit_fn = "allow"
|
||||
unit_arg = "allow"
|
||||
use_self = "warn"
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ description = "Yazi actor model"
|
|||
homepage = "https://yazi-rs.github.io"
|
||||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[features]
|
||||
default = [ "vendored-lua" ]
|
||||
vendored-lua = [ "mlua/vendored" ]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::if_same_then_else, clippy::option_map_unit_fn)]
|
||||
|
||||
extern crate self as yazi_actor;
|
||||
|
||||
yazi_macro::mod_pub!(cmp confirm core help input lives mgr pick spot tasks which);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ impl Folder {
|
|||
|
||||
impl UserData for Folder {
|
||||
fn add_fields<F: UserDataFields<Self>>(fields: &mut F) {
|
||||
cached_field!(fields, cwd, |_, me| Ok(Url::new(me.url.to_owned())));
|
||||
cached_field!(fields, cwd, |_, me| Ok(Url::new(&me.url)));
|
||||
cached_field!(fields, files, |_, me| Files::make(0..me.files.len(), me, &me.tab));
|
||||
cached_field!(fields, stage, |_, me| Ok(FolderStage::new(me.stage.clone())));
|
||||
cached_field!(fields, window, |_, me| Files::make(me.window.clone(), me, &me.tab));
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ impl UserData for Preference {
|
|||
fields.add_field_method_get("sort_dir_first", |_, me| Ok(me.sort_dir_first));
|
||||
fields.add_field_method_get("sort_translit", |_, me| Ok(me.sort_translit));
|
||||
|
||||
cached_field!(fields, linemode, |_, me| Ok(me.linemode.to_string()));
|
||||
cached_field!(fields, linemode, |lua, me| lua.create_string(&me.linemode));
|
||||
fields.add_field_method_get("show_hidden", |_, me| Ok(me.show_hidden));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ impl Selected {
|
|||
let inner = PtrCell::from(inner);
|
||||
|
||||
Lives::scoped_userdata(yazi_binding::Iter::new(
|
||||
inner.as_static().values().cloned().map(yazi_binding::Url::new),
|
||||
inner.as_static().values().map(yazi_binding::Url::new),
|
||||
Some(inner.len()),
|
||||
))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ impl Yanked {
|
|||
Lives::scoped_userdata(Self {
|
||||
inner,
|
||||
iter: Lives::scoped_userdata(Iter::new(
|
||||
inner.as_static().iter().cloned().map(yazi_binding::Url::new),
|
||||
inner.as_static().iter().map(yazi_binding::Url::new),
|
||||
Some(inner.len()),
|
||||
))?,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -34,13 +34,13 @@ impl Actor for Cd {
|
|||
|
||||
// Take parent to history
|
||||
if let Some(t) = tab.parent.take() {
|
||||
tab.history.insert(t.url.to_owned(), t);
|
||||
tab.history.insert(t.url.clone(), t);
|
||||
}
|
||||
|
||||
// Current
|
||||
let rep = tab.history.remove_or(&opt.target);
|
||||
let rep = mem::replace(&mut tab.current, rep);
|
||||
tab.history.insert(rep.url.to_owned(), rep);
|
||||
tab.history.insert(rep.url.clone(), rep);
|
||||
|
||||
// Parent
|
||||
if let Some(parent) = opt.target.parent() {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ impl Actor for Hover {
|
|||
{
|
||||
// `hover(Some)` occurs after user actions, such as create, rename, reveal, etc.
|
||||
// At this point, it's intuitive to track the location of the file regardless.
|
||||
tab.current.trace = Some(u.to_owned());
|
||||
tab.current.trace = Some(u.clone());
|
||||
}
|
||||
|
||||
// Publish through DDS
|
||||
|
|
|
|||
|
|
@ -57,11 +57,8 @@ impl Refresh {
|
|||
}
|
||||
}
|
||||
|
||||
let futs: Vec<_> = folders
|
||||
.iter()
|
||||
.filter(|&f| f.url.is_internal())
|
||||
.map(|&f| go(f.url.to_owned(), f.cha))
|
||||
.collect();
|
||||
let futs: Vec<_> =
|
||||
folders.iter().filter(|&f| f.url.is_internal()).map(|&f| go(f.url.clone(), f.cha)).collect();
|
||||
|
||||
if !futs.is_empty() {
|
||||
tokio::spawn(futures::future::join_all(futs));
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ description = "Yazi image adapter"
|
|||
homepage = "https://yazi-rs.github.io"
|
||||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
yazi-config = { path = "../yazi-config", version = "25.9.15" }
|
||||
yazi-fs = { path = "../yazi-fs", version = "25.9.15" }
|
||||
|
|
|
|||
|
|
@ -44,42 +44,40 @@ impl Brand {
|
|||
}
|
||||
|
||||
pub fn from_env() -> Option<Self> {
|
||||
use Brand as B;
|
||||
|
||||
let (term, program) = B::env();
|
||||
let (term, program) = Self::env();
|
||||
let vars = [
|
||||
("KITTY_WINDOW_ID", B::Kitty),
|
||||
("KONSOLE_VERSION", B::Konsole),
|
||||
("ITERM_SESSION_ID", B::Iterm2),
|
||||
("WEZTERM_EXECUTABLE", B::WezTerm),
|
||||
("GHOSTTY_RESOURCES_DIR", B::Ghostty),
|
||||
("WT_Session", B::Microsoft),
|
||||
("WARP_HONOR_PS1", B::Warp),
|
||||
("VSCODE_INJECTION", B::VSCode),
|
||||
("TABBY_CONFIG_DIRECTORY", B::Tabby),
|
||||
("KITTY_WINDOW_ID", Self::Kitty),
|
||||
("KONSOLE_VERSION", Self::Konsole),
|
||||
("ITERM_SESSION_ID", Self::Iterm2),
|
||||
("WEZTERM_EXECUTABLE", Self::WezTerm),
|
||||
("GHOSTTY_RESOURCES_DIR", Self::Ghostty),
|
||||
("WT_Session", Self::Microsoft),
|
||||
("WARP_HONOR_PS1", Self::Warp),
|
||||
("VSCODE_INJECTION", Self::VSCode),
|
||||
("TABBY_CONFIG_DIRECTORY", Self::Tabby),
|
||||
];
|
||||
|
||||
match term.as_str() {
|
||||
"xterm-kitty" => return Some(B::Kitty),
|
||||
"foot" => return Some(B::Foot),
|
||||
"foot-extra" => return Some(B::Foot),
|
||||
"xterm-ghostty" => return Some(B::Ghostty),
|
||||
"rio" => return Some(B::Rio),
|
||||
"rxvt-unicode-256color" => return Some(B::Urxvt),
|
||||
"xterm-kitty" => return Some(Self::Kitty),
|
||||
"foot" => return Some(Self::Foot),
|
||||
"foot-extra" => return Some(Self::Foot),
|
||||
"xterm-ghostty" => return Some(Self::Ghostty),
|
||||
"rio" => return Some(Self::Rio),
|
||||
"rxvt-unicode-256color" => return Some(Self::Urxvt),
|
||||
_ => {}
|
||||
}
|
||||
match program.as_str() {
|
||||
"iTerm.app" => return Some(B::Iterm2),
|
||||
"WezTerm" => return Some(B::WezTerm),
|
||||
"ghostty" => return Some(B::Ghostty),
|
||||
"WarpTerminal" => return Some(B::Warp),
|
||||
"rio" => return Some(B::Rio),
|
||||
"BlackBox" => return Some(B::BlackBox),
|
||||
"vscode" => return Some(B::VSCode),
|
||||
"Tabby" => return Some(B::Tabby),
|
||||
"Hyper" => return Some(B::Hyper),
|
||||
"mintty" => return Some(B::Mintty),
|
||||
"Apple_Terminal" => return Some(B::Apple),
|
||||
"iTerm.app" => return Some(Self::Iterm2),
|
||||
"WezTerm" => return Some(Self::WezTerm),
|
||||
"ghostty" => return Some(Self::Ghostty),
|
||||
"WarpTerminal" => return Some(Self::Warp),
|
||||
"rio" => return Some(Self::Rio),
|
||||
"BlackBox" => return Some(Self::BlackBox),
|
||||
"vscode" => return Some(Self::VSCode),
|
||||
"Tabby" => return Some(Self::Tabby),
|
||||
"Hyper" => return Some(Self::Hyper),
|
||||
"mintty" => return Some(Self::Mintty),
|
||||
"Apple_Terminal" => return Some(Self::Apple),
|
||||
_ => {}
|
||||
}
|
||||
if let Some((var, brand)) = vars.into_iter().find(|&(s, _)| env_exists(s)) {
|
||||
|
|
@ -91,30 +89,28 @@ impl Brand {
|
|||
}
|
||||
|
||||
pub(super) fn adapters(self) -> &'static [crate::Adapter] {
|
||||
use Brand as B;
|
||||
|
||||
use crate::Adapter as A;
|
||||
|
||||
match self {
|
||||
B::Kitty => &[A::Kgp],
|
||||
B::Konsole => &[A::KgpOld],
|
||||
B::Iterm2 => &[A::Iip, A::Sixel],
|
||||
B::WezTerm => &[A::Iip, A::Sixel],
|
||||
B::Foot => &[A::Sixel],
|
||||
B::Ghostty => &[A::Kgp],
|
||||
B::Microsoft => &[A::Sixel],
|
||||
B::Warp => &[A::Iip, A::KgpOld],
|
||||
B::Rio => &[A::Iip, A::Sixel],
|
||||
B::BlackBox => &[A::Sixel],
|
||||
B::VSCode => &[A::Iip, A::Sixel],
|
||||
B::Tabby => &[A::Iip, A::Sixel],
|
||||
B::Hyper => &[A::Iip, A::Sixel],
|
||||
B::Mintty => &[A::Iip],
|
||||
B::Tmux => &[],
|
||||
B::VTerm => &[],
|
||||
B::Apple => &[],
|
||||
B::Urxvt => &[],
|
||||
B::Bobcat => &[A::Iip, A::Sixel],
|
||||
Self::Kitty => &[A::Kgp],
|
||||
Self::Konsole => &[A::KgpOld],
|
||||
Self::Iterm2 => &[A::Iip, A::Sixel],
|
||||
Self::WezTerm => &[A::Iip, A::Sixel],
|
||||
Self::Foot => &[A::Sixel],
|
||||
Self::Ghostty => &[A::Kgp],
|
||||
Self::Microsoft => &[A::Sixel],
|
||||
Self::Warp => &[A::Iip, A::KgpOld],
|
||||
Self::Rio => &[A::Iip, A::Sixel],
|
||||
Self::BlackBox => &[A::Sixel],
|
||||
Self::VSCode => &[A::Iip, A::Sixel],
|
||||
Self::Tabby => &[A::Iip, A::Sixel],
|
||||
Self::Hyper => &[A::Iip, A::Sixel],
|
||||
Self::Mintty => &[A::Iip],
|
||||
Self::Tmux => &[],
|
||||
Self::VTerm => &[],
|
||||
Self::Apple => &[],
|
||||
Self::Urxvt => &[],
|
||||
Self::Bobcat => &[A::Iip, A::Sixel],
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::option_map_unit_fn)]
|
||||
|
||||
yazi_macro::mod_pub!(drivers);
|
||||
|
||||
yazi_macro::mod_flat!(adapter brand dimension emulator image info mux unknown);
|
||||
|
|
|
|||
|
|
@ -56,9 +56,7 @@ impl From<Url> for yazi_shared::url::UrlCow<'_> {
|
|||
impl TryFrom<&[u8]> for Url {
|
||||
type Error = mlua::Error;
|
||||
|
||||
fn try_from(value: &[u8]) -> mlua::Result<Self> {
|
||||
Ok(Self::new(UrlCow::try_from(value)?.into_owned()))
|
||||
}
|
||||
fn try_from(value: &[u8]) -> mlua::Result<Self> { Ok(Self::new(UrlCow::try_from(value)?)) }
|
||||
}
|
||||
|
||||
impl Url {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ description = "Yazi bootstrapper"
|
|||
homepage = "https://yazi-rs.github.io"
|
||||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
yazi-adapter = { path = "../yazi-adapter", version = "25.9.15" }
|
||||
yazi-config = { path = "../yazi-config", version = "25.9.15" }
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ description = "Yazi build system"
|
|||
homepage = "https://yazi-rs.github.io"
|
||||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ description = "Yazi command-line interface"
|
|||
homepage = "https://yazi-rs.github.io"
|
||||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ description = "Yazi code generator"
|
|||
homepage = "https://yazi-rs.github.io"
|
||||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::if_same_then_else, clippy::len_without_is_empty, clippy::option_map_unit_fn)]
|
||||
|
||||
yazi_macro::mod_pub!(cmp confirm help input mgr notify pick spot tab tasks which);
|
||||
|
||||
yazi_macro::mod_flat!(core);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::option_map_unit_fn)]
|
||||
|
||||
mod macros;
|
||||
|
||||
yazi_macro::mod_pub!(ember spark);
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ impl Sendable {
|
|||
Value::Table(tbl)
|
||||
}
|
||||
Data::Id(i) => yazi_binding::Id(*i).into_lua(lua)?,
|
||||
Data::Url(u) => yazi_binding::Url::new(u.clone()).into_lua(lua)?,
|
||||
Data::Url(u) => yazi_binding::Url::new(u).into_lua(lua)?,
|
||||
Data::Path(u) => yazi_binding::Path::new(u).into_lua(lua)?,
|
||||
Data::Bytes(b) => Value::String(lua.create_string(b)?),
|
||||
Data::Any(a) => {
|
||||
|
|
@ -243,7 +243,7 @@ impl Sendable {
|
|||
DataKey::Number(n) => Value::Number(n.0),
|
||||
DataKey::String(s) => Value::String(lua.create_string(&**s)?),
|
||||
DataKey::Id(i) => yazi_binding::Id(*i).into_lua(lua)?,
|
||||
DataKey::Url(u) => yazi_binding::Url::new(u.clone()).into_lua(lua)?,
|
||||
DataKey::Url(u) => yazi_binding::Url::new(u).into_lua(lua)?,
|
||||
DataKey::Path(u) => yazi_binding::Path::new(u).into_lua(lua)?,
|
||||
DataKey::Bytes(b) => Value::String(lua.create_string(b)?),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ tokio-stream = { workspace = true }
|
|||
# Logging
|
||||
tracing = { workspace = true }
|
||||
tracing-appender = "0.2.4"
|
||||
tracing-subscriber = { version = "0.3.20", features = [ "env-filter" ] }
|
||||
tracing-subscriber = { version = "0.3.22", features = [ "env-filter" ] }
|
||||
|
||||
[target."cfg(unix)".dependencies]
|
||||
libc = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::if_same_then_else)]
|
||||
|
||||
#[cfg(all(not(target_os = "macos"), not(target_os = "windows")))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::if_same_then_else, clippy::option_map_unit_fn)]
|
||||
|
||||
yazi_macro::mod_pub!(cha error mounts path provider);
|
||||
|
||||
yazi_macro::mod_flat!(cwd file files filter fns hash op scheme sorter sorting splatter stage url xdg);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::if_same_then_else)]
|
||||
|
||||
yazi_macro::mod_pub!(bindings elements external fs isolate loader process pubsub runtime theme utils);
|
||||
|
||||
yazi_macro::mod_flat!(lua);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::option_map_unit_fn)]
|
||||
|
||||
mod macros;
|
||||
|
||||
yazi_macro::mod_pub!(file plugin prework process);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::len_without_is_empty)]
|
||||
|
||||
pub mod fs;
|
||||
pub mod requests;
|
||||
pub mod responses;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::option_map_unit_fn)]
|
||||
|
||||
yazi_macro::mod_pub!(data errors event loc path pool scheme shell strand translit url wtf8);
|
||||
|
||||
yazi_macro::mod_flat!(alias bytes chars condition debounce either env id layer natsort os predictor ro_cell source sync_cell terminal tests throttle time utf8);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ impl Hash for PathBufDyn {
|
|||
|
||||
// --- PartialEq
|
||||
impl PartialEq for PathBufDyn {
|
||||
fn eq(&self, other: &PathBufDyn) -> bool { self.as_path() == other.as_path() }
|
||||
fn eq(&self, other: &Self) -> bool { self.as_path() == other.as_path() }
|
||||
}
|
||||
|
||||
impl PartialEq<PathDyn<'_>> for PathBufDyn {
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@ impl From<UrlBufCov> for UrlBuf {
|
|||
fn from(value: UrlBufCov) -> Self { value.0 }
|
||||
}
|
||||
|
||||
impl From<&UrlBufCov> for UrlBuf {
|
||||
fn from(value: &UrlBufCov) -> Self { value.0.clone() }
|
||||
}
|
||||
|
||||
impl From<UrlBuf> for UrlBufCov {
|
||||
fn from(value: UrlBuf) -> Self { Self(value) }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::if_same_then_else)]
|
||||
|
||||
yazi_macro::mod_pub!(provider);
|
||||
|
||||
yazi_macro::mod_flat!(cha file files fns op);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(clippy::if_same_then_else)]
|
||||
|
||||
yazi_macro::mod_pub!(input);
|
||||
|
||||
yazi_macro::mod_flat!(clipboard scrollable);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue