[Request] [+ ] D8957: hg-core: fix some clippy warnings
acezar (Antoine Cezar)
phabricator at mercurial-scm.org
Wed Aug 26 13:23:58 UTC 2020
acezar created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8957
AFFECTED FILES
rust/hg-core/src/operations/find_root.rs
CHANGE DETAILS
diff --git a/rust/hg-core/src/operations/find_root.rs b/rust/hg-core/src/operations/find_root.rs
--- a/rust/hg-core/src/operations/find_root.rs
+++ b/rust/hg-core/src/operations/find_root.rs
@@ -56,10 +56,10 @@
};
if current_dir.join(".hg").exists() {
- return Ok(current_dir.into());
+ return Ok(current_dir);
}
- let mut ancestors = current_dir.ancestors();
- while let Some(parent) = ancestors.next() {
+ let ancestors = current_dir.ancestors();
+ for parent in ancestors {
if parent.join(".hg").exists() {
return Ok(parent.into());
}
To: acezar, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200826/6c37ba81/attachment.html>
More information about the Mercurial-patches
mailing list