summaryrefslogtreecommitdiffstats
path: root/vendor/gix/src/object/tree/diff/for_each.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix/src/object/tree/diff/for_each.rs')
-rw-r--r--vendor/gix/src/object/tree/diff/for_each.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/gix/src/object/tree/diff/for_each.rs b/vendor/gix/src/object/tree/diff/for_each.rs
index a72033182..3932f9027 100644
--- a/vendor/gix/src/object/tree/diff/for_each.rs
+++ b/vendor/gix/src/object/tree/diff/for_each.rs
@@ -75,8 +75,9 @@ impl<'a, 'old> Platform<'a, 'old> {
}
Err(gix_diff::tree::changes::Error::Cancelled) => delegate
.err
- .map(|err| Err(Error::ForEach(Box::new(err))))
- .unwrap_or(Err(Error::Diff(gix_diff::tree::changes::Error::Cancelled))),
+ .map_or(Err(Error::Diff(gix_diff::tree::changes::Error::Cancelled)), |err| {
+ Err(Error::ForEach(Box::new(err)))
+ }),
Err(err) => Err(err.into()),
}
}