rust: remove comment about error handling of AncestorsIterator draft
authorYuya Nishihara <>
Tue, 11 Dec 2018 22:23:39 +0900
changeset 53700 76d8b20139a3
parent 53699 4e17679c336b
child 53701 c5e2395f0a2a
child 53702 2f98b5143437
push id1082
push dateWed, 12 Dec 2018 00:02:30 +0000
rust: remove comment about error handling of AncestorsIterator To be align with 443eb4bc41af "rust: propagate error of index_get_parents() properly." Spotted by Georges Racinet.
--- a/rust/hg-core/src/
+++ b/rust/hg-core/src/
@@ -100,28 +100,16 @@ impl<G: Graph> AncestorsIterator<G> {
 /// with a few non crucial differences:
 /// - 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 save a few pushes by comparing with `stoprev` before pushing
-/// Error treatment:
-/// We swallow the possible GraphError of conditionally_push_parents() to
-/// respect the Iterator trait in a simple manner: never emitting parents
-/// for the returned revision. We finds this good enough for now, because:
-/// - there's a good chance that invalid revisionss are fed from the start,
-///   and `new()` doesn't swallow the error result.
-/// - this is probably what the Python implementation produces anyway, due
-///   to filtering at each step, and Python code is currently the only
-///   concrete caller we target, so we shouldn't need a finer error treatment
-///   for the time being.
 impl<G: Graph> Iterator for AncestorsIterator<G> {
     type Item = Result<Revision, GraphError>;
     fn next(&mut self) -> Option<Self::Item> {
         let current = match self.visit.peek() {
             None => {
                 return None;