Skip to content

Commit 0918429

Browse files
committed
Do not require Default for collect_result_into() target
While it is required for `ResultIterExt::collect_result_into()`, we do not need `Default` for `collect_result_into()`. The target already exists. The requirement was likely introduced because of C&P.
1 parent 065791c commit 0918429

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ pub trait ResultIterExt<I, E> : Sized {
2626
}
2727

2828
fn collect_result_into<T>(self, target: &mut T) -> RResult<(), E>
29-
where T: Extend<I> + Default;
29+
where T: Extend<I>;
3030
}
3131

3232
impl<I, E, J> ResultIterExt<I, E> for J
3333
where J: Iterator<Item = RResult<I, E>>
3434
{
3535
fn collect_result_into<T>(self, target: &mut T) -> RResult<(), E>
36-
where T: Extend<I> + Default
36+
where T: Extend<I>
3737
{
3838
for item in self {
3939
target.extend(Some(item?));

0 commit comments

Comments
 (0)