diff --git a/rust/hg-core/src/ancestors.rs b/rust/hg-core/src/ancestors.rs --- a/rust/hg-core/src/ancestors.rs +++ b/rust/hg-core/src/ancestors.rs @@ -44,15 +44,12 @@ /// /// if `inclusive` is true, then the init revisions are emitted in /// particular, otherwise iteration starts from their parents. - pub fn new( + pub fn new( graph: G, - initrevs: I, + initrevs: impl IntoIterator, stoprev: Revision, inclusive: bool, - ) -> Result - where - I: IntoIterator, - { + ) -> Result { let filtered_initrevs = initrevs.into_iter().filter(|&r| r >= stoprev); if inclusive { let visit: BinaryHeap = filtered_initrevs.collect();