diff options
author | Dan Davison <dandavison7@gmail.com> | 2021-08-02 16:20:16 +0100 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2021-08-02 16:21:06 +0100 |
commit | e5c6ae47d06fd725fd9ec52580af4657160256ba (patch) | |
tree | e7550b879d05ae4e84d22f087aabe9e64409bd08 | |
parent | f956a38bfcdb54b8e8e36557361a553d14387794 (diff) |
clippy
- Fix --allow argument added in previous commit f956a38bfcdb54b8e8e36557361a553d14387794
- Fix lint
-rw-r--r-- | .github/workflows/ci.yml | 2 | ||||
-rw-r--r-- | src/parse.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ea094ee..d2ef967a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,7 +107,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy - args: -- -D warnings --allow needless_borrow + args: -- -D warnings --allow clippy::needless_borrow coverage: name: Code coverage diff --git a/src/parse.rs b/src/parse.rs index 7b4ef430..b39da14f 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -99,7 +99,7 @@ fn _parse_file_path(s: &str, git_diff_name: bool) -> String { // index·d00491f..0cfbf08·100644␊ // ---·a/a·b├──┤␊ // +++·b/c·d├──┤␊ - match s.strip_suffix("\t").unwrap_or(s) { + match s.strip_suffix('\t').unwrap_or(s) { path if path == "/dev/null" => "/dev/null", path if git_diff_name && DIFF_PREFIXES.iter().any(|s| path.starts_with(s)) => &path[2..], path if git_diff_name => &path, |