diff --git a/Cargo.lock b/Cargo.lock index 910d3d0a..e30e8da7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -367,9 +367,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.36" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2df961d8c8a0d08aa9945718ccf584145eee3f3aa06cddbeac12933781102e04" +checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" dependencies = [ "clap_builder", "clap_derive", @@ -377,9 +377,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.36" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "132dbda40fb6753878316a489d5a1242a8ef2f0d9e47ba01c951ea8aa7d013a5" +checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" dependencies = [ "anstream", "anstyle", @@ -2270,9 +2270,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" dependencies = [ "libc", ] diff --git a/Cargo.toml b/Cargo.toml index 5b752473..80536612 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ ansi-to-tui = "7.0.0" anyhow = "1.0.98" base64 = "0.22.1" bitflags = "2.9.0" -clap = { version = "4.5.36", features = [ "derive" ] } +clap = { version = "4.5.37", features = [ "derive" ] } core-foundation-sys = "0.8.7" crossterm = { version = "0.29.0", features = [ "event-stream" ] } dirs = "6.0.0" diff --git a/flake.lock b/flake.lock index 791801ac..2eadfcba 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1737003892, - "narHash": "sha256-RCzJE9wKByLCXmRBp+z8LK9EgdW+K+W/DXnJS4S/NVo=", + "lastModified": 1744868846, + "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ae06b9c2d83cb5c8b12d7d0e32692e93d1379713", + "rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c", "type": "github" }, "original": { @@ -48,11 +48,11 @@ ] }, "locked": { - "lastModified": 1737080704, - "narHash": "sha256-n+J2h9GM9ZpFOQUmtZoCr1+DFF/iO5UlmLJeHIxbZGY=", + "lastModified": 1745116541, + "narHash": "sha256-5xzA6dTfqCfTTDCo3ipPZzrg3wp01xmcr73y4cTNMP8=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "f9953fe89f8b65401fc4d4a288940bc2cb072949", + "rev": "e2142ef330a61c02f274ac9a9cb6f8487a5d0080", "type": "github" }, "original": { diff --git a/yazi-adapter/Cargo.toml b/yazi-adapter/Cargo.toml index 90095dff..0b544e4a 100644 --- a/yazi-adapter/Cargo.toml +++ b/yazi-adapter/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-adapter" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi image adapter" diff --git a/yazi-binding/Cargo.toml b/yazi-binding/Cargo.toml index 60ebb0ce..e0873f6c 100644 --- a/yazi-binding/Cargo.toml +++ b/yazi-binding/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-binding" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi Lua bindings" diff --git a/yazi-boot/Cargo.toml b/yazi-boot/Cargo.toml index 5217b4ef..f94f5116 100644 --- a/yazi-boot/Cargo.toml +++ b/yazi-boot/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-boot" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi bootstrapper" diff --git a/yazi-cli/Cargo.toml b/yazi-cli/Cargo.toml index ac61e9fd..1b76706e 100644 --- a/yazi-cli/Cargo.toml +++ b/yazi-cli/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-cli" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi command-line interface" diff --git a/yazi-codegen/Cargo.toml b/yazi-codegen/Cargo.toml index 8eb5f0c4..167ebe48 100644 --- a/yazi-codegen/Cargo.toml +++ b/yazi-codegen/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-codegen" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi codegen" diff --git a/yazi-config/Cargo.toml b/yazi-config/Cargo.toml index 80d5ee20..1063484c 100644 --- a/yazi-config/Cargo.toml +++ b/yazi-config/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-config" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi configuration file parser" diff --git a/yazi-core/Cargo.toml b/yazi-core/Cargo.toml index b2b27548..6f333f0c 100644 --- a/yazi-core/Cargo.toml +++ b/yazi-core/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-core" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi core logic" diff --git a/yazi-core/src/mgr/commands/bulk_rename.rs b/yazi-core/src/mgr/commands/bulk_rename.rs index b398f899..48c81579 100644 --- a/yazi-core/src/mgr/commands/bulk_rename.rs +++ b/yazi-core/src/mgr/commands/bulk_rename.rs @@ -142,7 +142,7 @@ impl Mgr { let mut sorted = Vec::with_capacity(old.len()); while !todos.is_empty() { // Paths that are non-incomes and don't need to be prioritized in this round - let mut outcomes: Vec<_> = incomes.iter().filter(|(_, &b)| !b).map(|(&p, _)| p).collect(); + let mut outcomes: Vec<_> = incomes.iter().filter(|&(_, b)| !b).map(|(&p, _)| p).collect(); outcomes.sort_unstable_by(|a, b| orders[b].cmp(&orders[a])); // If there're no outcomes, it means there are cycles in the renaming diff --git a/yazi-core/src/tab/commands/search.rs b/yazi-core/src/tab/commands/search.rs index a30e9216..7a98c618 100644 --- a/yazi-core/src/tab/commands/search.rs +++ b/yazi-core/src/tab/commands/search.rs @@ -20,9 +20,7 @@ impl Tab { handle.abort(); } - let mut input = - InputProxy::show(InputCfg::search(opt.via.as_ref()).with_value(opt.subject.to_owned())); - + let mut input = InputProxy::show(InputCfg::search(opt.via.as_ref()).with_value(&*opt.subject)); tokio::spawn(async move { if let Some(Ok(subject)) = input.recv().await { opt.subject = Cow::Owned(subject); diff --git a/yazi-core/src/tab/commands/shell.rs b/yazi-core/src/tab/commands/shell.rs index ee0d3dc3..f66882c1 100644 --- a/yazi-core/src/tab/commands/shell.rs +++ b/yazi-core/src/tab/commands/shell.rs @@ -56,9 +56,7 @@ impl Tab { let selected = self.hovered_and_selected().cloned().collect(); let input = opt.interactive.then(|| { - InputProxy::show( - InputCfg::shell(opt.block).with_value(opt.run.to_owned()).with_cursor(opt.cursor), - ) + InputProxy::show(InputCfg::shell(opt.block).with_value(&*opt.run).with_cursor(opt.cursor)) }); tokio::spawn(async move { diff --git a/yazi-dds/Cargo.toml b/yazi-dds/Cargo.toml index 265290c3..86b49284 100644 --- a/yazi-dds/Cargo.toml +++ b/yazi-dds/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-dds" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi data distribution service" diff --git a/yazi-dds/src/lib.rs b/yazi-dds/src/lib.rs index bc28bc6e..bd04acc7 100644 --- a/yazi-dds/src/lib.rs +++ b/yazi-dds/src/lib.rs @@ -22,14 +22,16 @@ pub fn init() { REMOTE.with(<_>::default); // Env - if let Some(s) = std::env::var("YAZI_ID").ok().filter(|s| !s.is_empty()) { - std::env::set_var("YAZI_PID", s); + unsafe { + if let Some(s) = std::env::var("YAZI_ID").ok().filter(|s| !s.is_empty()) { + std::env::set_var("YAZI_PID", s); + } + std::env::set_var("YAZI_ID", ID.to_string()); + std::env::set_var( + "YAZI_LEVEL", + (std::env::var("YAZI_LEVEL").unwrap_or_default().parse().unwrap_or(0u16) + 1).to_string(), + ); } - std::env::set_var("YAZI_ID", ID.to_string()); - std::env::set_var( - "YAZI_LEVEL", - (std::env::var("YAZI_LEVEL").unwrap_or_default().parse().unwrap_or(0u16) + 1).to_string(), - ); } pub fn serve() { diff --git a/yazi-ffi/Cargo.toml b/yazi-ffi/Cargo.toml index ba9107c9..c70161f4 100644 --- a/yazi-ffi/Cargo.toml +++ b/yazi-ffi/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-ffi" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi foreign function interface" diff --git a/yazi-ffi/src/disk_arbitration.rs b/yazi-ffi/src/disk_arbitration.rs index 77666f65..a91797fa 100644 --- a/yazi-ffi/src/disk_arbitration.rs +++ b/yazi-ffi/src/disk_arbitration.rs @@ -3,7 +3,7 @@ use std::ffi::{c_char, c_void}; use core_foundation_sys::{array::CFArrayRef, base::CFAllocatorRef, dictionary::CFDictionaryRef, runloop::CFRunLoopRef, string::CFStringRef}; #[link(name = "DiskArbitration", kind = "framework")] -extern "C" { +unsafe extern "C" { pub fn DASessionCreate(allocator: CFAllocatorRef) -> *const c_void; pub fn DADiskCreateFromBSDName( diff --git a/yazi-ffi/src/io_kit.rs b/yazi-ffi/src/io_kit.rs index 60d30759..13c246cc 100644 --- a/yazi-ffi/src/io_kit.rs +++ b/yazi-ffi/src/io_kit.rs @@ -4,7 +4,7 @@ use core_foundation_sys::{base::{CFAllocatorRef, CFTypeRef, mach_port_t}, dictio use libc::kern_return_t; #[link(name = "IOKit", kind = "framework")] -extern "C" { +unsafe extern "C" { pub fn IOServiceGetMatchingServices( mainPort: mach_port_t, matching: CFMutableDictionaryRef, diff --git a/yazi-fm/Cargo.toml b/yazi-fm/Cargo.toml index 9752b874..ba62bba7 100644 --- a/yazi-fm/Cargo.toml +++ b/yazi-fm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-fm" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi File Manager" diff --git a/yazi-fs/Cargo.toml b/yazi-fs/Cargo.toml index f85956bc..e2e5c4ba 100644 --- a/yazi-fs/Cargo.toml +++ b/yazi-fs/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-fs" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi file system" diff --git a/yazi-fs/src/cwd.rs b/yazi-fs/src/cwd.rs index 8b360e41..d9c49bde 100644 --- a/yazi-fs/src/cwd.rs +++ b/yazi-fs/src/cwd.rs @@ -32,7 +32,7 @@ impl Cwd { } self.store(Arc::new(url.clone())); - std::env::set_var("PWD", url); + unsafe { std::env::set_var("PWD", url) }; Self::sync_cwd(); true diff --git a/yazi-macro/Cargo.toml b/yazi-macro/Cargo.toml index ff85f2c1..adde3f0a 100644 --- a/yazi-macro/Cargo.toml +++ b/yazi-macro/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-macro" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi macros" diff --git a/yazi-plugin/Cargo.toml b/yazi-plugin/Cargo.toml index 84c4113e..16fb1787 100644 --- a/yazi-plugin/Cargo.toml +++ b/yazi-plugin/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-plugin" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi plugin system" diff --git a/yazi-proxy/Cargo.toml b/yazi-proxy/Cargo.toml index 0284314a..e34410da 100644 --- a/yazi-proxy/Cargo.toml +++ b/yazi-proxy/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-proxy" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi event proxy" diff --git a/yazi-scheduler/Cargo.toml b/yazi-scheduler/Cargo.toml index dcd59ab4..ae017465 100644 --- a/yazi-scheduler/Cargo.toml +++ b/yazi-scheduler/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "yazi-scheduler" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi task scheduler" diff --git a/yazi-shared/Cargo.toml b/yazi-shared/Cargo.toml index 802f9520..453609e2 100644 --- a/yazi-shared/Cargo.toml +++ b/yazi-shared/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "yazi-shared" version = "25.4.8" -edition = "2021" +edition = "2024" license = "MIT" authors = [ "sxyazi " ] description = "Yazi shared library" homepage = "https://yazi-rs.github.io" repository = "https://github.com/sxyazi/yazi" -rust-version = "1.83.0" +rust-version = "1.85.0" [dependencies] yazi-macro = { path = "../yazi-macro", version = "25.4.8" } diff --git a/yazi-shared/src/shell/windows.rs b/yazi-shared/src/shell/windows.rs index 324a1a93..5d975431 100644 --- a/yazi-shared/src/shell/windows.rs +++ b/yazi-shared/src/shell/windows.rs @@ -93,7 +93,7 @@ fn split_slice(s: &[u16]) -> std::io::Result> { use windows_sys::{Win32::{Foundation::LocalFree, UI::Shell::CommandLineToArgvW}, core::PCWSTR}; - extern "C" { + unsafe extern "C" { fn wcslen(s: PCWSTR) -> usize; } diff --git a/yazi-widgets/Cargo.toml b/yazi-widgets/Cargo.toml index fa0f5972..ff15ece9 100644 --- a/yazi-widgets/Cargo.toml +++ b/yazi-widgets/Cargo.toml @@ -1,13 +1,12 @@ [package] -name = "yazi-widgets" -version = "25.4.8" -edition = "2021" -license = "MIT" -authors = [ "sxyazi " ] -description = "Yazi user interface widgets" -homepage = "https://yazi-rs.github.io" -repository = "https://github.com/sxyazi/yazi" -rust-version = "1.83.0" +name = "yazi-widgets" +version = "25.4.8" +edition = "2024" +license = "MIT" +authors = [ "sxyazi " ] +description = "Yazi user interface widgets" +homepage = "https://yazi-rs.github.io" +repository = "https://github.com/sxyazi/yazi" [dependencies] yazi-codegen = { path = "../yazi-codegen", version = "25.4.8" }