summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Otto <th1000s@posteo.net>2022-10-05 23:10:19 +0200
committerDan Davison <dandavison7@gmail.com>2022-10-11 16:19:25 -0400
commit65044c0e0d4b0e3baeae92791d1add0ade061f2f (patch)
treeb9ed1174432df552d8e4f96877e3d61bc0cb4251 /src
parentae4f77493655b50f763b683d3c2edb43e3bc8f41 (diff)
Fix clippy warnings after rust 1.64 upgrade
Diffstat (limited to 'src')
-rw-r--r--src/features/diff_highlight.rs5
-rw-r--r--src/utils/process.rs6
2 files changed, 4 insertions, 7 deletions
diff --git a/src/features/diff_highlight.rs b/src/features/diff_highlight.rs
index fc4544c6..ccc39f9d 100644
--- a/src/features/diff_highlight.rs
+++ b/src/features/diff_highlight.rs
@@ -7,10 +7,7 @@ pub fn make_feature() -> Vec<(String, OptionValueFunction)> {
pub fn _make_feature(bold: bool) -> Vec<(String, OptionValueFunction)> {
let mut feature = raw::make_feature();
- feature = feature
- .into_iter()
- .filter(|(s, _)| s != "keep-plus-minus-markers" && s != "tabs")
- .collect();
+ feature.retain(|(s, _)| s != "keep-plus-minus-markers" && s != "tabs");
feature.extend(builtin_feature!([
(
"commit-style",
diff --git a/src/utils/process.rs b/src/utils/process.rs
index 1f24aa02..5c933d54 100644
--- a/src/utils/process.rs
+++ b/src/utils/process.rs
@@ -332,14 +332,14 @@ trait ProcessInterface {
fn refresh_processes(&mut self);
fn parent_process(&mut self, pid: DeltaPid) -> Option<&Self::Out> {
- self.refresh_process(pid).then(|| ())?;
+ self.refresh_process(pid).then_some(())?;
let parent_pid = self.process(pid)?.parent()?;
- self.refresh_process(parent_pid).then(|| ())?;
+ self.refresh_process(parent_pid).then_some(())?;
self.process(parent_pid)
}
fn naive_sibling_process(&mut self, pid: DeltaPid) -> Option<&Self::Out> {
let sibling_pid = pid - 1;
- self.refresh_process(sibling_pid).then(|| ())?;
+ self.refresh_process(sibling_pid).then_some(())?;
self.process(sibling_pid)
}
fn find_sibling_in_refreshed_processes<F, T>(