Lint everything

This commit is contained in:
Peltoche 2018-12-08 23:10:27 +01:00 committed by Pierre Peltier
parent 8bc324ccc7
commit deb03c5c53
3 changed files with 6 additions and 6 deletions

View file

@ -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),

View file

@ -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 {

View file

@ -35,10 +35,10 @@ impl<'a> From<&'a Path> for SymLink {
};
}
return SymLink {
SymLink {
target: None,
valid: false,
};
}
}
}