mirror of
https://github.com/sxyazi/yazi.git
synced 2026-05-13 08:16:40 +00:00
refactor!: return Path instead of Url from File.link_to (#3385)
This commit is contained in:
parent
ade1025a74
commit
76196aab70
19 changed files with 50 additions and 65 deletions
|
|
@ -151,7 +151,7 @@ macro_rules! impl_file_fields {
|
|||
($fields:ident) => {
|
||||
$crate::cached_field!($fields, cha, |_, me| Ok($crate::Cha(me.cha)));
|
||||
$crate::cached_field!($fields, url, |_, me| Ok($crate::Url::new(me.url_owned())));
|
||||
$crate::cached_field!($fields, link_to, |_, me| Ok(me.link_to_url().map($crate::Url::new)));
|
||||
$crate::cached_field!($fields, link_to, |_, me| Ok(me.link_to.as_ref().map($crate::Path::new)));
|
||||
|
||||
$crate::cached_field!($fields, name, |lua, me| {
|
||||
me.name().map(|s| lua.create_string(s.encoded_bytes())).transpose()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue