rust/hg-core/src/ancestors.rs
changeset 41105 35ee590b1892
parent 41104 247f51cfc668
child 41131 486908e691be
--- a/rust/hg-core/src/ancestors.rs	Tue Dec 18 22:12:16 2018 +0900
+++ b/rust/hg-core/src/ancestors.rs	Tue Dec 18 22:23:48 2018 +0900
@@ -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<I>(
+    pub fn new(
         graph: G,
-        initrevs: I,
+        initrevs: impl IntoIterator<Item = Revision>,
         stoprev: Revision,
         inclusive: bool,
-    ) -> Result<Self, GraphError>
-    where
-        I: IntoIterator<Item = Revision>,
-    {
+    ) -> Result<Self, GraphError> {
         let filtered_initrevs = initrevs.into_iter().filter(|&r| r >= stoprev);
         if inclusive {
             let visit: BinaryHeap<Revision> = filtered_initrevs.collect();