mirror of
https://github.com/lsd-rs/lsd
synced 2025-03-04 23:17:15 +00:00
Fixes
This commit is contained in:
parent
29ee29eccc
commit
917498022e
2 changed files with 4 additions and 3 deletions
|
@ -15,7 +15,7 @@ pub use self::owner::Owner;
|
|||
pub use self::permissions::Permissions;
|
||||
pub use self::size::Size;
|
||||
pub use self::symlink::SymLink;
|
||||
pub use icon::{Icons};
|
||||
pub use icon::Icons;
|
||||
|
||||
use std::fs::read_link;
|
||||
use std::path::PathBuf;
|
||||
|
|
|
@ -38,9 +38,10 @@ impl Name {
|
|||
}
|
||||
|
||||
pub fn render(&self, colors: &Colors, icons: &Icons) -> ColoredString {
|
||||
let mut content = String::with_capacity(4 /*for the icon*/ + ICON_SPACE.len() +self.name.len() + 3 /* spaces */);
|
||||
let icon = icons.get(self);
|
||||
let mut content = String::with_capacity(icon.len() + ICON_SPACE.len() +self.name.len() + 3 /* spaces */);
|
||||
|
||||
content += icons.get(self);
|
||||
content += icon;
|
||||
content += ICON_SPACE;
|
||||
|
||||
let elem = match self.file_type {
|
||||
|
|
Loading…
Add table
Reference in a new issue