Mercurial > hg-stable
changeset 41107:247f51cfc668
rust: use .rev() for reverse range
Differential Revision: https://phab.mercurial-scm.org/D5450
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 18 Dec 2018 22:12:16 +0900 |
parents | 86f0ed7ac688 |
children | 35ee590b1892 |
files | rust/hg-core/src/ancestors.rs |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/hg-core/src/ancestors.rs Fri Jan 04 00:00:44 2019 +0530 +++ b/rust/hg-core/src/ancestors.rs Tue Dec 18 22:12:16 2018 +0900 @@ -321,7 +321,7 @@ // TODO heuristics for with_capacity()? let mut missing: Vec<Revision> = Vec::new(); - for curr in (0..=start).map(|i| start - i) { + for curr in (0..=start).rev() { if revs_visit.is_empty() { break; }