rust: improved docstring
authorGeorges Racinet <gracinet@anybox.fr>
Tue, 11 Dec 2018 17:31:54 +0100
changeset 40932 dc38d976ff4d
parent 40931 e54bfde922f2
child 40933 18513d6ef7d4
rust: improved docstring In the previous wording, rustfmt wanted to cut at the == which is not very readable in my taste. Differential Revision: https://phab.mercurial-scm.org/D5414
rust/hg-core/src/ancestors.rs
--- a/rust/hg-core/src/ancestors.rs	Thu Dec 13 17:18:57 2018 +0800
+++ b/rust/hg-core/src/ancestors.rs	Tue Dec 11 17:31:54 2018 +0100
@@ -101,9 +101,9 @@
 ///
 /// - there's no filtering of invalid parent revisions. Actually, it should be
 ///   consistent and more efficient to filter them from the end caller.
-/// - we don't have the optimization for adjacent revs
-///   (case where p1 == rev-1), because it amounts to update the first element
-///   of the heap without sifting, which Rust's BinaryHeap doesn't let us do.
+/// - we don't have the optimization for adjacent revisions (i.e., the case
+///   where `p1 == rev - 1`), because it amounts to update the first element of
+///   the heap without sifting, which Rust's BinaryHeap doesn't let us do.
 /// - we save a few pushes by comparing with `stoprev` before pushing
 impl<G: Graph> Iterator for AncestorsIterator<G> {
     type Item = Result<Revision, GraphError>;