summaryrefslogtreecommitdiffstats
path: root/src/parse.rs
diff options
context:
space:
mode:
authorMarco Ieni <11428655+MarcoIeni@users.noreply.github.com>2020-11-06 00:12:27 +0100
committerGitHub <noreply@github.com>2020-11-05 18:12:27 -0500
commit3dac4f7fa6451c446902583d2d2aa1358960fe7c (patch)
treeaa56fafc017bcea4346516400079234ee4a2bdae /src/parse.rs
parent8c8ddc8a815997250419594dd506bca6313433a6 (diff)
fix some clippy warnings (#380)
Diffstat (limited to 'src/parse.rs')
-rw-r--r--src/parse.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parse.rs b/src/parse.rs
index cc259e37..6188117d 100644
--- a/src/parse.rs
+++ b/src/parse.rs
@@ -63,7 +63,7 @@ pub fn get_file_change_description_from_file_paths(
format!("comparing: {} ⟶ {}", minus_file, plus_file)
} else {
let format_label = |label: &str| {
- if label.len() > 0 {
+ if !label.is_empty() {
format!("{} ", label)
} else {
"".to_string()
@@ -143,7 +143,7 @@ pub fn parse_hunk_header(line: &str) -> (String, Vec<(usize, usize)>) {
})
.collect();
let code_fragment = &caps[2];
- return (code_fragment.to_string(), line_numbers_and_hunk_lengths);
+ (code_fragment.to_string(), line_numbers_and_hunk_lengths)
}
/// Attempt to parse input as a file path and return extension as a &str.