From 205f18e84803c6c6d8561b5e69171833ed445915 Mon Sep 17 00:00:00 2001 From: Benjamin Sago Date: Sun, 7 May 2017 17:39:01 +0100 Subject: [PATCH] =?UTF-8?q?It=20looks=20like=20you=E2=80=99re=20writing=20?= =?UTF-8?q?a=20letter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fs/file.rs | 7 +++---- src/info/sources.rs | 12 ++++++------ src/options/mod.rs | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/fs/file.rs b/src/fs/file.rs index 0f05f7b..ac5e796 100644 --- a/src/fs/file.rs +++ b/src/fs/file.rs @@ -184,7 +184,7 @@ impl<'dir> File<'dir> { }; let target_path = target_path_.as_ref().unwrap_or(&path); // Use plain `metadata` instead of `symlink_metadata` - we *want* to follow links. - (fs::metadata(&target_path), ext(&target_path)) + (fs::metadata(&target_path), ext(target_path)) }; let filename = match path.components().next_back() { @@ -418,9 +418,8 @@ impl<'dir> FileTarget<'dir> { /// gets used to determine how to highlight the link in grid views. pub fn is_broken(&self) -> bool { match *self { - FileTarget::Ok(_) => false, - FileTarget::Broken(_) => true, - FileTarget::Err(_) => true, + FileTarget::Ok(_) => false, + FileTarget::Broken(_) | FileTarget::Err(_) => true, } } } diff --git a/src/info/sources.rs b/src/info/sources.rs index 804bd3d..c26ccef 100644 --- a/src/info/sources.rs +++ b/src/info/sources.rs @@ -24,12 +24,12 @@ impl<'a> File<'a> { "o" => vec![self.path.with_extension("c"), self.path.with_extension("cpp")], // C, C++ "pyc" => vec![self.path.with_extension("py")], // Python - "aux" => vec![self.path.with_extension("tex")], // TeX: auxiliary file - "bbl" => vec![self.path.with_extension("tex")], // BibTeX bibliography file - "blg" => vec![self.path.with_extension("tex")], // BibTeX log file - "lof" => vec![self.path.with_extension("tex")], // TeX list of figures - "log" => vec![self.path.with_extension("tex")], // TeX log file - "lot" => vec![self.path.with_extension("tex")], // TeX list of tables + "aux" | // TeX: auxiliary file + "bbl" | // BibTeX bibliography file + "blg" | // BibTeX log file + "lof" | // TeX list of figures + "log" | // TeX log file + "lot" | // TeX list of tables "toc" => vec![self.path.with_extension("tex")], // TeX table of contents _ => vec![], // No source files if none of the above diff --git a/src/options/mod.rs b/src/options/mod.rs index c6e5084..b59ce78 100644 --- a/src/options/mod.rs +++ b/src/options/mod.rs @@ -130,7 +130,7 @@ impl Options { /// results will end up being displayed. pub fn should_scan_for_git(&self) -> bool { match self.view { - View::Details(Details { columns: Some(cols), .. }) => cols.should_scan_for_git(), + View::Details(Details { columns: Some(cols), .. }) | View::GridDetails(GridDetails { details: Details { columns: Some(cols), .. }, .. }) => cols.should_scan_for_git(), _ => false, }