From 746c7f5ce9840d583f52cdf24b9250668a12a445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20=C2=B7=20Misaki=20Masa?= Date: Fri, 16 May 2025 16:46:59 +0800 Subject: [PATCH] chore: bump Rust version to 1.86.0 (#2766) --- flake.lock | 12 ++++++------ yazi-fm/src/cmp/cmp.rs | 5 +++-- yazi-shared/Cargo.toml | 2 +- yazi-term/Cargo.toml | 17 ++++++++--------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 2eadfcba..00ad72c1 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1744868846, - "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", + "lastModified": 1747312588, + "narHash": "sha256-MmJvj6mlWzeRwKGLcwmZpKaOPZ5nJb/6al5CXqJsgjo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c", + "rev": "b1bebd0fe266bbd1820019612ead889e96a8fa2d", "type": "github" }, "original": { @@ -48,11 +48,11 @@ ] }, "locked": { - "lastModified": 1745116541, - "narHash": "sha256-5xzA6dTfqCfTTDCo3ipPZzrg3wp01xmcr73y4cTNMP8=", + "lastModified": 1747363019, + "narHash": "sha256-N4dwkRBmpOosa4gfFkFf/LTD8oOcNkAyvZ07JvRDEf0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "e2142ef330a61c02f274ac9a9cb6f8487a5d0080", + "rev": "0e624f2b1972a34be1a9b35290ed18ea4b419b6f", "type": "github" }, "original": { diff --git a/yazi-fm/src/cmp/cmp.rs b/yazi-fm/src/cmp/cmp.rs index 3bf37ab9..6a4e4a66 100644 --- a/yazi-fm/src/cmp/cmp.rs +++ b/yazi-fm/src/cmp/cmp.rs @@ -1,4 +1,4 @@ -use std::path::MAIN_SEPARATOR_STR; +use std::path::{MAIN_SEPARATOR_STR, Path}; use ratatui::{buffer::Buffer, layout::Rect, widgets::{Block, BorderType, List, ListItem, Widget}}; use yazi_adapter::Dimension; @@ -26,7 +26,8 @@ impl Widget for Cmp<'_> { let icon = if x.is_dir { &THEME.cmp.icon_folder } else { &THEME.cmp.icon_file }; let slash = if x.is_dir { MAIN_SEPARATOR_STR } else { "" }; - let mut item = ListItem::new(format!(" {icon} {}{slash}", x.name.display())); + // FIXME: Bump Rust to 1.87.0 and use `OsStr::display()` instead + let mut item = ListItem::new(format!(" {icon} {}{slash}", Path::new(&x.name).display())); if i == self.cx.cmp.rel_cursor() { item = item.style(THEME.cmp.active); } else { diff --git a/yazi-shared/Cargo.toml b/yazi-shared/Cargo.toml index d28eee15..84ebb056 100644 --- a/yazi-shared/Cargo.toml +++ b/yazi-shared/Cargo.toml @@ -7,7 +7,7 @@ authors = [ "sxyazi " ] description = "Yazi shared library" homepage = "https://yazi-rs.github.io" repository = "https://github.com/sxyazi/yazi" -rust-version = "1.85.0" +rust-version = "1.86.0" [dependencies] yazi-macro = { path = "../yazi-macro", version = "25.5.14" } diff --git a/yazi-term/Cargo.toml b/yazi-term/Cargo.toml index 43205d2b..80ede62b 100644 --- a/yazi-term/Cargo.toml +++ b/yazi-term/Cargo.toml @@ -1,13 +1,12 @@ [package] -name = "yazi-term" -version = "25.5.14" -edition = "2024" -license = "MIT" -authors = [ "sxyazi " ] -description = "Yazi terminal extensions" -homepage = "https://yazi-rs.github.io" -repository = "https://github.com/sxyazi/yazi" -rust-version = "1.85.0" +name = "yazi-term" +version = "25.5.14" +edition = "2024" +license = "MIT" +authors = [ "sxyazi " ] +description = "Yazi terminal extensions" +homepage = "https://yazi-rs.github.io" +repository = "https://github.com/sxyazi/yazi" [dependencies] yazi-macro = { path = "../yazi-macro", version = "25.5.14" }