Skip to content

Commit d83a83f

Browse files
authored
Update collect.rs
1 parent d8d2e82 commit d83a83f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/iter/traits/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ pub trait FromIterator<A>: Sized {
154154

155155
// implement `FromIterator` for type with Default and Extend
156156
impl<T, A: Default + Extend<T>> FromIterator<T> for A {
157-
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self {
157+
default fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self {
158158
let mut collection = A::default();
159159
collection.extend(iter);
160160
collection

0 commit comments

Comments
 (0)