Show More
@@ -44,15 +44,12 b' impl<G: Graph> AncestorsIterator<G> {' | |||||
44 | /// |
|
44 | /// | |
45 | /// if `inclusive` is true, then the init revisions are emitted in |
|
45 | /// if `inclusive` is true, then the init revisions are emitted in | |
46 | /// particular, otherwise iteration starts from their parents. |
|
46 | /// particular, otherwise iteration starts from their parents. | |
47 |
pub fn new |
|
47 | pub fn new( | |
48 | graph: G, |
|
48 | graph: G, | |
49 | initrevs: I, |
|
49 | initrevs: impl IntoIterator<Item = Revision>, | |
50 | stoprev: Revision, |
|
50 | stoprev: Revision, | |
51 | inclusive: bool, |
|
51 | inclusive: bool, | |
52 | ) -> Result<Self, GraphError> |
|
52 | ) -> Result<Self, GraphError> { | |
53 | where |
|
|||
54 | I: IntoIterator<Item = Revision>, |
|
|||
55 | { |
|
|||
56 | let filtered_initrevs = initrevs.into_iter().filter(|&r| r >= stoprev); |
|
53 | let filtered_initrevs = initrevs.into_iter().filter(|&r| r >= stoprev); | |
57 | if inclusive { |
|
54 | if inclusive { | |
58 | let visit: BinaryHeap<Revision> = filtered_initrevs.collect(); |
|
55 | let visit: BinaryHeap<Revision> = filtered_initrevs.collect(); |
General Comments 0
You need to be logged in to leave comments.
Login now