diff options
author | Peltoche <dev@halium.fr> | 2018-12-08 23:10:27 +0100 |
---|---|---|
committer | Pierre Peltier <dev@halium.fr> | 2018-12-08 23:22:08 +0100 |
commit | deb03c5c531f813ff4a4dda0f62adf01961e483d (patch) | |
tree | 1149294c528a0cd250e63a3768e548ec68705a04 | |
parent | 8bc324ccc71c23e166175ce29fe6bd8fe1cfda8e (diff) |
Lint everything
-rw-r--r-- | src/batch.rs | 4 | ||||
-rw-r--r-- | src/icon.rs | 4 | ||||
-rw-r--r-- | src/meta/symlink.rs | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/batch.rs b/src/batch.rs index 5e4c543..8775584 100644 --- a/src/batch.rs +++ b/src/batch.rs @@ -37,7 +37,7 @@ impl Batch { let mut res = Vec::with_capacity(self.0.len()); for meta in &self.0 { - let icon = icons.from_name(&meta.name); + let icon = icons.get(&meta.name); let strings: &[ANSIString] = &[icon.render(colors), meta.name.render(colors)]; @@ -55,7 +55,7 @@ impl Batch { let (max_size_value_length, max_size_unit_length) = self.detect_size_lenghts(); for meta in &self.0 { - let icon = icons.from_name(&meta.name); + let icon = icons.get(&meta.name); let strings: &[ANSIString] = &[ meta.file_type.render(colors), diff --git a/src/icon.rs b/src/icon.rs index 33aa2c8..92bb277 100644 --- a/src/icon.rs +++ b/src/icon.rs @@ -2,7 +2,7 @@ use color::{ColoredString, Colors, Elem}; use meta::{FileType, Name}; use std::collections::HashMap; -const ICON_SPACE: &'static str = " "; +const ICON_SPACE: &str = " "; pub struct Icon { icon: &'static str, @@ -38,7 +38,7 @@ impl Icons { } } - pub fn from_name(&self, name: &Name) -> Icon { + pub fn get(&self, name: &Name) -> Icon { // Check the known names. if let Some(res) = self.icons_by_name.get(name.name().as_str()) { return Icon { diff --git a/src/meta/symlink.rs b/src/meta/symlink.rs index 82a929f..fe6fa5c 100644 --- a/src/meta/symlink.rs +++ b/src/meta/symlink.rs @@ -35,10 +35,10 @@ impl<'a> From<&'a Path> for SymLink { }; } - return SymLink { + SymLink { target: None, valid: false, - }; + } } } |