mirror of
https://github.com/sxyazi/yazi.git
synced 2026-05-13 08:16:40 +00:00
refactor: refine PathLike and StrandLike traits (#3340)
This commit is contained in:
parent
9cd742811a
commit
d3ad1c0920
109 changed files with 1282 additions and 1492 deletions
|
|
@ -8,6 +8,9 @@ description = "Yazi file manager"
|
|||
homepage = "https://yazi-rs.github.io"
|
||||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use yazi_actor::Ctx;
|
|||
use yazi_boot::BOOT;
|
||||
use yazi_macro::act;
|
||||
use yazi_parser::{VoidOpt, mgr::CdSource};
|
||||
use yazi_shared::{data::Data, strand::StrandBufLike, url::UrlLike};
|
||||
use yazi_shared::{data::Data, strand::StrandLike, url::UrlLike};
|
||||
|
||||
use crate::app::App;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use ratatui::{buffer::Buffer, layout::Rect, widgets::{Block, BorderType, List, L
|
|||
use yazi_adapter::Dimension;
|
||||
use yazi_config::{THEME, popup::{Offset, Position}};
|
||||
use yazi_core::Core;
|
||||
use yazi_shared::strand::{AsStrand, StrandLike};
|
||||
use yazi_shared::strand::StrandLike;
|
||||
|
||||
pub(crate) struct Cmp<'a> {
|
||||
core: &'a Core,
|
||||
|
|
@ -26,7 +26,7 @@ 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.as_strand().display()));
|
||||
let mut item = ListItem::new(format!(" {icon} {}{slash}", x.name.display()));
|
||||
if i == self.core.cmp.rel_cursor() {
|
||||
item = item.style(THEME.cmp.active);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue