diff --git a/Cargo.lock b/Cargo.lock index 5bc92796..33447db7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -343,10 +343,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.34" +version = "1.2.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42bc4aea80032b7bf409b0bc7ccad88853858911b7713a8062fdc0623867bedc" +checksum = "590f9024a68a8c40351881787f1934dc11afd69090f5edb6831464694d836ea3" dependencies = [ + "find-msvc-tools", "jobserver", "libc", "shlex", @@ -652,9 +653,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc" dependencies = [ "powerfmt", ] @@ -873,6 +874,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e178e4fba8a2726903f6ba98a6d221e76f9c12c650d5dc0e6afdc50677b49650" + [[package]] name = "flate2" version = "1.1.2" @@ -1025,7 +1032,7 @@ dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasi 0.14.3+wasi-0.2.4", ] [[package]] @@ -1053,8 +1060,8 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.10", - "regex-syntax 0.8.6", + "regex-automata", + "regex-syntax", ] [[package]] @@ -1076,6 +1083,17 @@ dependencies = [ "allocator-api2", "equivalent", "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", "serde", ] @@ -1117,9 +1135,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "image" -version = "0.25.6" +version = "0.25.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" +checksum = "1c6a3ce16143778e24df6f95365f12ed105425b22abefd289dd88a64bab59605" dependencies = [ "bytemuck", "byteorder-lite", @@ -1127,6 +1145,7 @@ dependencies = [ "exr", "gif", "image-webp", + "moxcms", "num-traits", "png", "qoi", @@ -1159,7 +1178,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.5", "serde", ] @@ -1390,7 +1409,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown", + "hashbrown 0.15.5", ] [[package]] @@ -1399,7 +1418,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86ea4e65087ff52f3862caff188d489f1fab49a0cb09e01b2e3f1a617b10aaed" dependencies = [ - "hashbrown", + "hashbrown 0.15.5", ] [[package]] @@ -1432,11 +1451,11 @@ dependencies = [ [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -1484,9 +1503,9 @@ dependencies = [ [[package]] name = "mlua" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2fea92b2adabd51808311b101551d6e3f8602b65e9fae51f7ad5b3d500f4cd" +checksum = "5b3dd94c3c4dea0049b22296397040840a8f6b5b5229f438434ba82df402b42d" dependencies = [ "anyhow", "bstr", @@ -1531,6 +1550,16 @@ dependencies = [ "syn", ] +[[package]] +name = "moxcms" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd32fa8935aeadb8a8a6b6b351e40225570a37c43de67690383d87ef170cd08" +dependencies = [ + "num-traits", + "pxfm", +] + [[package]] name = "new_debug_unreachable" version = "1.0.6" @@ -1579,12 +1608,11 @@ checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" dependencies = [ - "overload", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -1764,12 +1792,6 @@ dependencies = [ "serde", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "palette" version = "0.7.6" @@ -1867,11 +1889,11 @@ dependencies = [ [[package]] name = "png" -version = "0.17.16" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.3", "crc32fast", "fdeflate", "flate2", @@ -1943,6 +1965,15 @@ dependencies = [ "syn", ] +[[package]] +name = "pxfm" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e790881194f6f6e86945f0a42a6981977323669aeb6c40e9c7ec253133b96f8" +dependencies = [ + "num-traits", +] + [[package]] name = "qoi" version = "0.4.1" @@ -2170,17 +2201,8 @@ checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.10", - "regex-syntax 0.8.6", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] @@ -2191,15 +2213,9 @@ checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.6", + "regex-syntax", ] -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.8.6" @@ -2273,9 +2289,9 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "safe_arch" -version = "0.9.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb5032219cc30e5bb98749b19a18ceb2cf15e24ba8d517a7e64dff4f1f1eca5" +checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" dependencies = [ "bytemuck", ] @@ -2525,7 +2541,7 @@ dependencies = [ "once_cell", "onig", "plist", - "regex-syntax 0.8.6", + "regex-syntax", "serde", "serde_derive", "serde_json", @@ -2640,12 +2656,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.41" +version = "0.3.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +checksum = "8ca967379f9d8eb8058d86ed467d81d03e81acd45757e4ca341c24affbe8e8e3" dependencies = [ "deranged", - "itoa", "libc", "num-conv", "num_threads", @@ -2657,15 +2672,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" +checksum = "a9108bb380861b07264b950ded55a44a14a4adc68b9f5efd85aafc3aa4d40a68" [[package]] name = "time-macros" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +checksum = "7182799245a7264ce590b349d90338f1c1affad93d2639aed5f8f69c090b334c" dependencies = [ "num-conv", "time-core", @@ -2856,14 +2871,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", @@ -3048,11 +3063,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.2+wasi-0.2.4" +version = "0.14.3+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "6a51ae83037bdd272a9e28ce236db8c07016dd0d50c27038b3f407533c030c95" dependencies = [ - "wit-bindgen-rt", + "wit-bindgen", ] [[package]] @@ -3133,9 +3148,9 @@ dependencies = [ [[package]] name = "wide" -version = "0.7.34" +version = "0.7.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0ab08c041f0cbb00a12fd091b2877dcec2311f90f87a88391d4b0961ffb4fe" +checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" dependencies = [ "bytemuck", "safe_arch", @@ -3284,6 +3299,15 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.59.0" @@ -3447,13 +3471,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.3", -] +checksum = "052283831dbae3d879dc7f51f3d92703a316ca49f91540417d38591826127814" [[package]] name = "wyz" @@ -3471,7 +3492,7 @@ dependencies = [ "anyhow", "crossterm 0.29.0", "futures", - "hashbrown", + "hashbrown 0.16.0", "libc", "mlua", "paste", @@ -3522,7 +3543,7 @@ name = "yazi-binding" version = "25.6.11" dependencies = [ "ansi-to-tui", - "hashbrown", + "hashbrown 0.16.0", "mlua", "paste", "ratatui", @@ -3546,7 +3567,7 @@ dependencies = [ "clap_complete_fig", "clap_complete_nushell", "futures", - "hashbrown", + "hashbrown 0.16.0", "regex", "serde", "vergen-gitcl", @@ -3604,7 +3625,7 @@ dependencies = [ "crossterm 0.29.0", "dirs", "globset", - "hashbrown", + "hashbrown 0.16.0", "indexmap", "ratatui", "regex", @@ -3624,7 +3645,7 @@ version = "25.6.11" dependencies = [ "anyhow", "crossterm 0.29.0", - "hashbrown", + "hashbrown 0.16.0", "indexmap", "parking_lot", "ratatui", @@ -3652,7 +3673,7 @@ name = "yazi-dds" version = "25.6.11" dependencies = [ "anyhow", - "hashbrown", + "hashbrown 0.16.0", "mlua", "ordered-float 5.0.0", "parking_lot", @@ -3735,7 +3756,7 @@ dependencies = [ "dirs", "foldhash 0.2.0", "futures", - "hashbrown", + "hashbrown 0.16.0", "libc", "objc", "parking_lot", @@ -3767,8 +3788,9 @@ dependencies = [ "anyhow", "bitflags 2.9.3", "crossterm 0.29.0", - "hashbrown", + "hashbrown 0.16.0", "mlua", + "ordered-float 5.0.0", "serde", "tokio", "yazi-binding", @@ -3786,7 +3808,7 @@ dependencies = [ "anyhow", "crossterm 0.29.0", "futures", - "hashbrown", + "hashbrown 0.16.0", "libc", "mlua", "parking_lot", @@ -3841,9 +3863,11 @@ dependencies = [ "anyhow", "async-priority-channel", "futures", - "hashbrown", + "hashbrown 0.16.0", "libc", "lru 0.16.0", + "mlua", + "ordered-float 5.0.0", "parking_lot", "scopeguard", "tokio", @@ -3867,7 +3891,7 @@ dependencies = [ "crossterm 0.29.0", "foldhash 0.2.0", "futures", - "hashbrown", + "hashbrown 0.16.0", "libc", "memchr", "ordered-float 5.0.0", @@ -3898,7 +3922,7 @@ name = "yazi-watcher" version = "25.6.11" dependencies = [ "anyhow", - "hashbrown", + "hashbrown 0.16.0", "notify", "parking_lot", "tokio", diff --git a/Cargo.toml b/Cargo.toml index 0546eab2..98805d45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,11 +31,11 @@ dirs = "6.0.0" foldhash = "0.2.0" futures = "0.3.31" globset = "0.4.16" -hashbrown = { version = "0.15.5", features = [ "serde" ] } +hashbrown = { version = "0.16.0", features = [ "serde" ] } indexmap = { version = "2.11.0", features = [ "serde" ] } libc = "0.2.175" lru = "0.16.0" -mlua = { version = "0.11.2", features = [ "anyhow", "async", "error-send", "lua54", "macros", "serde" ] } +mlua = { version = "0.11.3", features = [ "anyhow", "async", "error-send", "lua54", "macros", "serde" ] } objc = "0.2.7" ordered-float = { version = "5.0.0", features = [ "serde" ] } parking_lot = "0.12.4" diff --git a/yazi-actor/src/context.rs b/yazi-actor/src/context.rs index 9b8079f8..876826ac 100644 --- a/yazi-actor/src/context.rs +++ b/yazi-actor/src/context.rs @@ -15,12 +15,10 @@ pub struct Ctx<'a> { impl Deref for Ctx<'_> { type Target = Core; - #[inline] fn deref(&self) -> &Self::Target { self.core } } impl DerefMut for Ctx<'_> { - #[inline] fn deref_mut(&mut self) -> &mut Self::Target { self.core } } diff --git a/yazi-actor/src/lives/core.rs b/yazi-actor/src/lives/core.rs index d3182362..d7860c01 100644 --- a/yazi-actor/src/lives/core.rs +++ b/yazi-actor/src/lives/core.rs @@ -22,7 +22,6 @@ impl Deref for Core { } impl Core { - #[inline] pub(super) fn make(inner: &yazi_core::Core) -> mlua::Result { Lives::scoped_userdata(Self { inner: inner.into(), diff --git a/yazi-actor/src/lives/file.rs b/yazi-actor/src/lives/file.rs index f29476f8..4ce1858e 100644 --- a/yazi-actor/src/lives/file.rs +++ b/yazi-actor/src/lives/file.rs @@ -30,7 +30,6 @@ impl AsRef for File { } impl File { - #[inline] pub(super) fn make( idx: usize, folder: &yazi_core::tab::Folder, diff --git a/yazi-actor/src/lives/files.rs b/yazi-actor/src/lives/files.rs index f6114bac..884f03dc 100644 --- a/yazi-actor/src/lives/files.rs +++ b/yazi-actor/src/lives/files.rs @@ -20,7 +20,6 @@ impl Deref for Files { } impl Files { - #[inline] pub(super) fn make( window: Range, folder: &yazi_core::tab::Folder, diff --git a/yazi-actor/src/lives/filter.rs b/yazi-actor/src/lives/filter.rs index 1bef8375..2aecb51f 100644 --- a/yazi-actor/src/lives/filter.rs +++ b/yazi-actor/src/lives/filter.rs @@ -15,7 +15,6 @@ impl Deref for Filter { } impl Filter { - #[inline] pub(super) fn make(inner: &yazi_fs::Filter) -> mlua::Result { Lives::scoped_userdata(Self { inner: inner.into() }) } diff --git a/yazi-actor/src/lives/finder.rs b/yazi-actor/src/lives/finder.rs index df992983..c03afeef 100644 --- a/yazi-actor/src/lives/finder.rs +++ b/yazi-actor/src/lives/finder.rs @@ -15,7 +15,6 @@ impl Deref for Finder { } impl Finder { - #[inline] pub(super) fn make(inner: &yazi_core::tab::Finder) -> mlua::Result { Lives::scoped_userdata(Self { inner: inner.into() }) } diff --git a/yazi-actor/src/lives/folder.rs b/yazi-actor/src/lives/folder.rs index 9ce52196..2d0f6806 100644 --- a/yazi-actor/src/lives/folder.rs +++ b/yazi-actor/src/lives/folder.rs @@ -25,7 +25,6 @@ impl Deref for Folder { } impl Folder { - #[inline] pub(super) fn make( window: Option>, inner: &yazi_core::tab::Folder, diff --git a/yazi-actor/src/lives/lives.rs b/yazi-actor/src/lives/lives.rs index 5e8f2b58..37e3bbff 100644 --- a/yazi-actor/src/lives/lives.rs +++ b/yazi-actor/src/lives/lives.rs @@ -38,7 +38,6 @@ impl Lives { result } - #[inline] pub(crate) fn scoped_userdata(data: T) -> mlua::Result where T: UserData + 'static, diff --git a/yazi-actor/src/lives/mode.rs b/yazi-actor/src/lives/mode.rs index 8e1921f7..71515ca2 100644 --- a/yazi-actor/src/lives/mode.rs +++ b/yazi-actor/src/lives/mode.rs @@ -15,7 +15,6 @@ impl Deref for Mode { } impl Mode { - #[inline] pub(super) fn make(inner: &yazi_core::tab::Mode) -> mlua::Result { Lives::scoped_userdata(Self { inner: inner.into() }) } diff --git a/yazi-actor/src/lives/preference.rs b/yazi-actor/src/lives/preference.rs index 4e5c4e0a..f77a30b5 100644 --- a/yazi-actor/src/lives/preference.rs +++ b/yazi-actor/src/lives/preference.rs @@ -19,7 +19,6 @@ impl Deref for Preference { } impl Preference { - #[inline] pub(super) fn make(inner: &yazi_core::tab::Preference) -> mlua::Result { Lives::scoped_userdata(Self { inner: inner.into(), v_sort_by: None, v_linemode: None }) } diff --git a/yazi-actor/src/lives/preview.rs b/yazi-actor/src/lives/preview.rs index 7e618458..30a4a1c1 100644 --- a/yazi-actor/src/lives/preview.rs +++ b/yazi-actor/src/lives/preview.rs @@ -19,7 +19,6 @@ impl Deref for Preview { } impl Preview { - #[inline] pub(super) fn make(tab: &yazi_core::tab::Tab) -> mlua::Result { Lives::scoped_userdata(Self { tab: tab.into(), v_folder: None }) } diff --git a/yazi-actor/src/lives/selected.rs b/yazi-actor/src/lives/selected.rs index dd513b33..b3569b96 100644 --- a/yazi-actor/src/lives/selected.rs +++ b/yazi-actor/src/lives/selected.rs @@ -7,7 +7,6 @@ use crate::lives::PtrCell; pub(super) struct Selected; impl Selected { - #[inline] pub(super) fn make(inner: &yazi_core::tab::Selected) -> mlua::Result { let inner = PtrCell::from(inner); diff --git a/yazi-actor/src/lives/tab.rs b/yazi-actor/src/lives/tab.rs index 26c32d4d..0e8afe81 100644 --- a/yazi-actor/src/lives/tab.rs +++ b/yazi-actor/src/lives/tab.rs @@ -25,7 +25,6 @@ impl Deref for Tab { } impl Tab { - #[inline] pub(super) fn make(inner: &yazi_core::tab::Tab) -> mlua::Result { Lives::scoped_userdata(Self { inner: inner.into(), diff --git a/yazi-actor/src/lives/tabs.rs b/yazi-actor/src/lives/tabs.rs index 2733d16e..d2ab60b9 100644 --- a/yazi-actor/src/lives/tabs.rs +++ b/yazi-actor/src/lives/tabs.rs @@ -15,7 +15,6 @@ impl Deref for Tabs { } impl Tabs { - #[inline] pub(super) fn make(inner: &yazi_core::mgr::Tabs) -> mlua::Result { Lives::scoped_userdata(Self { inner: inner.into() }) } diff --git a/yazi-actor/src/lives/tasks.rs b/yazi-actor/src/lives/tasks.rs index a79a59e4..a5b39f41 100644 --- a/yazi-actor/src/lives/tasks.rs +++ b/yazi-actor/src/lives/tasks.rs @@ -1,13 +1,15 @@ use std::ops::Deref; use mlua::{AnyUserData, LuaSerdeExt, UserData, UserDataFields, Value}; -use yazi_binding::cached_field; +use yazi_binding::{cached_field, deprecate}; +use yazi_plugin::runtime::SER_OPT; use super::{Lives, PtrCell}; pub(super) struct Tasks { inner: PtrCell, + v_summary: Option, v_progress: Option, } @@ -18,14 +20,27 @@ impl Deref for Tasks { } impl Tasks { - #[inline] pub(super) fn make(inner: &yazi_core::tasks::Tasks) -> mlua::Result { - Lives::scoped_userdata(Self { inner: inner.into(), v_progress: None }) + Lives::scoped_userdata(Self { inner: inner.into(), v_summary: None, v_progress: None }) } } impl UserData for Tasks { fn add_fields>(fields: &mut F) { - cached_field!(fields, progress, |lua, me| lua.to_value(&me.progress)); + cached_field!(fields, summary, |lua, me| lua.to_value_with(&me.summary, SER_OPT)); + + cached_field!(fields, progress, |lua, me| { + deprecate!( + lua, + "`cx.tasks.progress` is deprecated, use `cx.tasks.summary` instead, in your {}" + ); + lua.create_table_from([ + ("total", me.summary.total), + ("succ", me.summary.success), + ("fail", me.summary.failed), + ("found", 0), + ("processed", 0), + ]) + }); } } diff --git a/yazi-actor/src/lives/yanked.rs b/yazi-actor/src/lives/yanked.rs index d7dd120c..6237bb30 100644 --- a/yazi-actor/src/lives/yanked.rs +++ b/yazi-actor/src/lives/yanked.rs @@ -17,7 +17,6 @@ impl Deref for Yanked { } impl Yanked { - #[inline] pub(super) fn make(inner: &yazi_core::mgr::Yanked) -> mlua::Result { let inner = PtrCell::from(inner); diff --git a/yazi-actor/src/tasks/arrow.rs b/yazi-actor/src/tasks/arrow.rs index 0f44dce2..2289123b 100644 --- a/yazi-actor/src/tasks/arrow.rs +++ b/yazi-actor/src/tasks/arrow.rs @@ -17,7 +17,7 @@ impl Actor for Arrow { let tasks = &mut cx.tasks; let old = tasks.cursor; - tasks.cursor = opt.step.add(tasks.cursor, tasks.summaries.len(), Tasks::limit()); + tasks.cursor = opt.step.add(tasks.cursor, tasks.snaps.len(), Tasks::limit()); succ!(render!(tasks.cursor != old)); } diff --git a/yazi-actor/src/tasks/cancel.rs b/yazi-actor/src/tasks/cancel.rs index b52a2d12..61acc0e0 100644 --- a/yazi-actor/src/tasks/cancel.rs +++ b/yazi-actor/src/tasks/cancel.rs @@ -20,7 +20,7 @@ impl Actor for Cancel { succ!(); } - tasks.summaries = tasks.paginate(); + tasks.snaps = tasks.paginate(); act!(tasks:arrow, cx)?; succ!(render!()); } diff --git a/yazi-actor/src/tasks/close.rs b/yazi-actor/src/tasks/close.rs index 34862c37..386b28ca 100644 --- a/yazi-actor/src/tasks/close.rs +++ b/yazi-actor/src/tasks/close.rs @@ -19,7 +19,7 @@ impl Actor for Close { } tasks.visible = false; - tasks.summaries = Vec::new(); + tasks.snaps = Vec::new(); act!(tasks:arrow, cx)?; succ!(render!()); diff --git a/yazi-actor/src/tasks/show.rs b/yazi-actor/src/tasks/show.rs index 7561d431..a47b3175 100644 --- a/yazi-actor/src/tasks/show.rs +++ b/yazi-actor/src/tasks/show.rs @@ -19,7 +19,7 @@ impl Actor for Show { } tasks.visible = true; - tasks.summaries = tasks.paginate(); + tasks.snaps = tasks.paginate(); act!(tasks:arrow, cx)?; succ!(render!()); diff --git a/yazi-adapter/Cargo.toml b/yazi-adapter/Cargo.toml index fcbd406e..ac5ea638 100644 --- a/yazi-adapter/Cargo.toml +++ b/yazi-adapter/Cargo.toml @@ -20,7 +20,7 @@ ansi-to-tui = { workspace = true } anyhow = { workspace = true } base64 = { workspace = true } crossterm = { workspace = true } -image = { version = "0.25.6", default-features = false, features = [ "avif", "bmp", "dds", "exr", "ff", "gif", "hdr", "ico", "jpeg", "png", "pnm", "qoi", "tga", "webp" ] } +image = { version = "0.25.7", default-features = false, features = [ "avif", "bmp", "dds", "exr", "ff", "gif", "hdr", "ico", "jpeg", "png", "pnm", "qoi", "tga", "webp" ] } palette = { version = "0.7.6", default-features = false } quantette = { version = "0.3.0", default-features = false } ratatui = { workspace = true } diff --git a/yazi-adapter/src/drivers/kgp_old.rs b/yazi-adapter/src/drivers/kgp_old.rs index fe4d58f1..3b03f759 100644 --- a/yazi-adapter/src/drivers/kgp_old.rs +++ b/yazi-adapter/src/drivers/kgp_old.rs @@ -25,7 +25,6 @@ impl KgpOld { }) } - #[inline] pub(crate) fn image_erase(_: Rect) -> Result<()> { let mut w = TTY.lockout(); write!(w, "{START}_Gq=2,a=d,d=A{ESCAPE}\\{CLOSE}")?; diff --git a/yazi-adapter/src/image.rs b/yazi-adapter/src/image.rs index f079c7c3..1805d723 100644 --- a/yazi-adapter/src/image.rs +++ b/yazi-adapter/src/image.rs @@ -85,7 +85,6 @@ impl Image { .unwrap_or(rect) } - #[inline] fn filter() -> FilterType { match YAZI.preview.image_filter.as_str() { "nearest" => FilterType::Nearest, diff --git a/yazi-binding/src/cha.rs b/yazi-binding/src/cha.rs index 8eee53be..d6a7da9d 100644 --- a/yazi-binding/src/cha.rs +++ b/yazi-binding/src/cha.rs @@ -14,7 +14,6 @@ impl Deref for Cha { impl Cha { pub fn install(lua: &Lua) -> mlua::Result<()> { - #[inline] fn parse_time(f: Option) -> mlua::Result> { Ok(match f { Some(n) if n >= 0.0 => Some(SystemTime::UNIX_EPOCH + Duration::from_secs_f64(n)), diff --git a/yazi-binding/src/elements/area.rs b/yazi-binding/src/elements/area.rs index 23971939..d1258fbe 100644 --- a/yazi-binding/src/elements/area.rs +++ b/yazi-binding/src/elements/area.rs @@ -17,7 +17,6 @@ impl Default for Area { } impl Area { - #[inline] pub fn size(self) -> ratatui::layout::Size { match self { Self::Pos(pos) => { @@ -27,7 +26,6 @@ impl Area { } } - #[inline] pub fn inner(self, padding: ratatui::widgets::Padding) -> Self { match self { Self::Pos(mut pos) => { @@ -38,7 +36,6 @@ impl Area { } } - #[inline] pub fn transform( self, f: impl FnOnce(yazi_config::popup::Position) -> ratatui::layout::Rect, diff --git a/yazi-binding/src/elements/clear.rs b/yazi-binding/src/elements/clear.rs index 65b0e8c5..0e41c2b1 100644 --- a/yazi-binding/src/elements/clear.rs +++ b/yazi-binding/src/elements/clear.rs @@ -54,7 +54,6 @@ impl UserData for Clear { } } -#[inline] const fn is_overlapping(a: ratatui::layout::Rect, b: ratatui::layout::Rect) -> bool { a.x < b.x + b.width && a.x + a.width > b.x && a.y < b.y + b.height && a.y + a.height > b.y } diff --git a/yazi-binding/src/elements/table.rs b/yazi-binding/src/elements/table.rs index 4007bf41..6ce06829 100644 --- a/yazi-binding/src/elements/table.rs +++ b/yazi-binding/src/elements/table.rs @@ -78,7 +78,6 @@ impl Table { table.render(rect, buf, &mut self.state); } - #[inline] pub fn len(&self) -> usize { self.rows.len() } pub fn select(&mut self, idx: Option) { diff --git a/yazi-binding/src/error.rs b/yazi-binding/src/error.rs index 7ffc40aa..99c8f3e0 100644 --- a/yazi-binding/src/error.rs +++ b/yazi-binding/src/error.rs @@ -19,7 +19,6 @@ impl Error { lua.globals().raw_set("Error", lua.create_table_from([("custom", new)])?) } - #[inline] pub fn custom(msg: impl Into) -> Self { Self::Custom(msg.into()) } pub fn into_string(self) -> SStr { diff --git a/yazi-binding/src/id.rs b/yazi-binding/src/id.rs index dd5470ca..985316b0 100644 --- a/yazi-binding/src/id.rs +++ b/yazi-binding/src/id.rs @@ -8,7 +8,6 @@ pub struct Id(pub yazi_shared::Id); impl Deref for Id { type Target = yazi_shared::Id; - #[inline] fn deref(&self) -> &Self::Target { &self.0 } } diff --git a/yazi-binding/src/iter.rs b/yazi-binding/src/iter.rs index 29abe1f7..7659c54e 100644 --- a/yazi-binding/src/iter.rs +++ b/yazi-binding/src/iter.rs @@ -13,7 +13,6 @@ where I: Iterator + 'static, T: IntoLua + 'static, { - #[inline] pub fn new(iter: I, len: Option) -> Self { Self { iter, len, count: 0, cache: vec![] } } } @@ -22,7 +21,6 @@ where I: Iterator + 'static, T: FromLua + 'static, { - #[inline] pub fn into_iter(self, lua: &Lua) -> impl Iterator> { self .cache diff --git a/yazi-cli/src/package/dependency.rs b/yazi-cli/src/package/dependency.rs index f5736445..d2310ecb 100644 --- a/yazi-cli/src/package/dependency.rs +++ b/yazi-cli/src/package/dependency.rs @@ -39,7 +39,6 @@ impl Dependency { } } - #[inline] pub(super) fn identical(&self, other: &Self) -> bool { self.parent == other.parent && self.child == other.child } diff --git a/yazi-cli/src/package/package.rs b/yazi-cli/src/package/package.rs index eae7c13c..4d2a0e2d 100644 --- a/yazi-cli/src/package/package.rs +++ b/yazi-cli/src/package/package.rs @@ -138,10 +138,8 @@ impl Package { Local::write(Self::toml(), s).await.context("Failed to write package.toml") } - #[inline] fn toml() -> PathBuf { Xdg::config_dir().join("package.toml") } - #[inline] fn identical(&self, other: &Dependency) -> Option<&Dependency> { self.plugins.iter().chain(&self.flavors).find(|d| d.identical(other)) } diff --git a/yazi-config/src/keymap/keymap.rs b/yazi-config/src/keymap/keymap.rs index f1618274..79de6303 100644 --- a/yazi-config/src/keymap/keymap.rs +++ b/yazi-config/src/keymap/keymap.rs @@ -19,7 +19,6 @@ pub struct Keymap { } impl Keymap { - #[inline] pub fn get(&self, layer: Layer) -> &[Chord] { match layer { Layer::App => &[], diff --git a/yazi-config/src/opener/rule.rs b/yazi-config/src/opener/rule.rs index 20075c87..5e3b64b2 100644 --- a/yazi-config/src/opener/rule.rs +++ b/yazi-config/src/opener/rule.rs @@ -16,7 +16,6 @@ pub struct OpenerRule { } impl OpenerRule { - #[inline] pub fn desc(&self) -> String { if !self.desc.is_empty() { self.desc.clone() diff --git a/yazi-config/src/pattern.rs b/yazi-config/src/pattern.rs index 016b9f3e..e922ed98 100644 --- a/yazi-config/src/pattern.rs +++ b/yazi-config/src/pattern.rs @@ -17,7 +17,6 @@ pub struct Pattern { } impl Pattern { - #[inline] pub fn match_url(&self, url: impl AsRef, is_dir: bool) -> bool { let url = url.as_ref(); @@ -42,7 +41,6 @@ impl Pattern { self.inner.is_match(path) } - #[inline] pub fn match_mime(&self, mime: impl AsRef) -> bool { self.is_star || (!mime.as_ref().is_empty() && self.inner.is_match(mime.as_ref())) } diff --git a/yazi-config/src/popup/options.rs b/yazi-config/src/popup/options.rs index 039c3cb7..66b45b02 100644 --- a/yazi-config/src/popup/options.rs +++ b/yazi-config/src/popup/options.rs @@ -176,7 +176,6 @@ impl ConfirmCfg { } impl PickCfg { - #[inline] fn max_height(len: usize) -> u16 { YAZI.pick.open_offset.height.min(YAZI.pick.border().saturating_add(len as u16)) } diff --git a/yazi-config/src/popup/position.rs b/yazi-config/src/popup/position.rs index ce4d1d3b..9e36a4c5 100644 --- a/yazi-config/src/popup/position.rs +++ b/yazi-config/src/popup/position.rs @@ -10,7 +10,6 @@ pub struct Position { } impl Position { - #[inline] pub const fn new(origin: Origin, offset: Offset) -> Self { Self { origin, offset } } pub fn rect(&self, WindowSize { columns, rows, .. }: WindowSize) -> Rect { diff --git a/yazi-config/src/preset.rs b/yazi-config/src/preset.rs index 03e180a0..7c7762ef 100644 --- a/yazi-config/src/preset.rs +++ b/yazi-config/src/preset.rs @@ -3,17 +3,14 @@ use crate::{Yazi, keymap::Keymap, theme::Theme}; pub(crate) struct Preset; impl Preset { - #[inline] pub(super) fn yazi() -> Result { toml::from_str(&yazi_macro::config_preset!("yazi")) } - #[inline] pub(super) fn keymap() -> Result { toml::from_str(&yazi_macro::config_preset!("keymap")) } - #[inline] pub(super) fn theme(light: bool) -> Result { toml::from_str(&if light { yazi_macro::theme_preset!("light") diff --git a/yazi-config/src/preview/preview.rs b/yazi-config/src/preview/preview.rs index 00b48693..0ae0a0a5 100644 --- a/yazi-config/src/preview/preview.rs +++ b/yazi-config/src/preview/preview.rs @@ -29,15 +29,12 @@ pub struct Preview { } impl Preview { - #[inline] pub fn tmpfile(&self, prefix: &str) -> PathBuf { self.cache_dir.join(format!("{prefix}-{}", timestamp_us())) } - #[inline] pub fn indent(&self) -> SStr { Self::indent_with(self.tab_size as usize) } - #[inline] pub fn indent_with(n: usize) -> SStr { if let Some(s) = TABS.get(n) { Cow::Borrowed(s) } else { Cow::Owned(" ".repeat(n)) } } diff --git a/yazi-config/src/style.rs b/yazi-config/src/style.rs index 9063f805..1476b733 100644 --- a/yazi-config/src/style.rs +++ b/yazi-config/src/style.rs @@ -76,7 +76,6 @@ impl From