mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-21 19:45:11 +00:00
Fix borrowing code smells
This commit is contained in:
parent
1f409793ae
commit
7c1878f0e4
@ -221,13 +221,13 @@ impl<'dir> File<'dir> {
|
||||
path.to_path_buf()
|
||||
}
|
||||
else if let Some(dir) = self.parent_dir {
|
||||
dir.join(&*path)
|
||||
dir.join(path)
|
||||
}
|
||||
else if let Some(parent) = self.path.parent() {
|
||||
parent.join(&*path)
|
||||
parent.join(path)
|
||||
}
|
||||
else {
|
||||
self.path.join(&*path)
|
||||
self.path.join(path)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ impl<'a> Render<'a> {
|
||||
(None, _) => {/* Keep Git how it is */},
|
||||
}
|
||||
|
||||
let mut table = Table::new(table, self.git, &self.theme);
|
||||
let mut table = Table::new(table, self.git, self.theme);
|
||||
|
||||
if self.opts.header {
|
||||
let header = table.header_row();
|
||||
|
@ -202,7 +202,7 @@ impl<'a> Render<'a> {
|
||||
(None, _) => {/* Keep Git how it is */},
|
||||
}
|
||||
|
||||
let mut table = Table::new(options, self.git, &self.theme);
|
||||
let mut table = Table::new(options, self.git, self.theme);
|
||||
let mut rows = Vec::new();
|
||||
|
||||
if self.details.header {
|
||||
|
@ -87,7 +87,7 @@ fn default_zoned(time: SystemTime, zone: &TimeZone) -> String {
|
||||
}
|
||||
|
||||
fn get_dateformat(date: &LocalDateTime) -> &'static DateFormat<'static> {
|
||||
match (is_recent(&date), *MAXIMUM_MONTH_WIDTH) {
|
||||
match (is_recent(date), *MAXIMUM_MONTH_WIDTH) {
|
||||
(true, 4) => &FOUR_WIDE_DATE_TIME,
|
||||
(true, 5) => &FIVE_WIDE_DATE_TIME,
|
||||
(true, _) => &OTHER_WIDE_DATE_TIME,
|
||||
|
Loading…
Reference in New Issue
Block a user