summaryrefslogtreecommitdiff
path: root/src/stream_ext/collect.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream_ext/collect.rs')
-rw-r--r--src/stream_ext/collect.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stream_ext/collect.rs b/src/stream_ext/collect.rs
index 23f48b0..a33a6d6 100644
--- a/src/stream_ext/collect.rs
+++ b/src/stream_ext/collect.rs
@@ -113,7 +113,7 @@ impl<T: AsRef<str>> sealed::FromStreamPriv<T> for String {
}
fn finalize(_: sealed::Internal, collection: &mut String) -> String {
- mem::replace(collection, String::new())
+ mem::take(collection)
}
}
@@ -132,7 +132,7 @@ impl<T> sealed::FromStreamPriv<T> for Vec<T> {
}
fn finalize(_: sealed::Internal, collection: &mut Vec<T>) -> Vec<T> {
- mem::replace(collection, vec![])
+ mem::take(collection)
}
}