Skip to content

Commit 6338341

Browse files
authored
Merge pull request #520 from gierlachg/stream_pinning
Cleaning up stream pinning.
2 parents f611cec + e442eba commit 6338341

File tree

18 files changed

+5
-49
lines changed

18 files changed

+5
-49
lines changed

src/collections/binary_heap/from_stream.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ impl<T: Ord> FromStream<T> for BinaryHeap<T> {
1212
let stream = stream.into_stream();
1313

1414
Box::pin(async move {
15-
pin_utils::pin_mut!(stream);
16-
1715
let mut out = BinaryHeap::new();
1816
stream::extend(&mut out, stream).await;
1917
out

src/collections/btree_map/from_stream.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ impl<K: Ord, V> FromStream<(K, V)> for BTreeMap<K, V> {
1212
let stream = stream.into_stream();
1313

1414
Box::pin(async move {
15-
pin_utils::pin_mut!(stream);
16-
1715
let mut out = BTreeMap::new();
1816
stream::extend(&mut out, stream).await;
1917
out

src/collections/btree_set/from_stream.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ impl<T: Ord> FromStream<T> for BTreeSet<T> {
1212
let stream = stream.into_stream();
1313

1414
Box::pin(async move {
15-
pin_utils::pin_mut!(stream);
16-
1715
let mut out = BTreeSet::new();
1816
stream::extend(&mut out, stream).await;
1917
out

src/collections/hash_map/from_stream.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ where
1717
let stream = stream.into_stream();
1818

1919
Box::pin(async move {
20-
pin_utils::pin_mut!(stream);
21-
2220
let mut out = HashMap::with_hasher(Default::default());
2321
stream::extend(&mut out, stream).await;
2422
out

src/collections/hash_set/from_stream.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ where
1717
let stream = stream.into_stream();
1818

1919
Box::pin(async move {
20-
pin_utils::pin_mut!(stream);
21-
2220
let mut out = HashSet::with_hasher(Default::default());
2321
stream::extend(&mut out, stream).await;
2422
out

src/collections/linked_list/from_stream.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ impl<T> FromStream<T> for LinkedList<T> {
1212
let stream = stream.into_stream();
1313

1414
Box::pin(async move {
15-
pin_utils::pin_mut!(stream);
16-
1715
let mut out = LinkedList::new();
1816
stream::extend(&mut out, stream).await;
1917
out

src/collections/vec_deque/from_stream.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ impl<T> FromStream<T> for VecDeque<T> {
1212
let stream = stream.into_stream();
1313

1414
Box::pin(async move {
15-
pin_utils::pin_mut!(stream);
16-
1715
let mut out = VecDeque::new();
1816
stream::extend(&mut out, stream).await;
1917
out

src/option/from_stream.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ where
1717
let stream = stream.into_stream();
1818

1919
Box::pin(async move {
20-
pin_utils::pin_mut!(stream);
21-
2220
// Using `scan` here because it is able to stop the stream early
2321
// if a failure occurs
2422
let mut found_error = false;

src/option/product.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ where
3939
where S: Stream<Item = Option<U>> + 'a
4040
{
4141
Box::pin(async move {
42-
pin_utils::pin_mut!(stream);
43-
4442
// Using `scan` here because it is able to stop the stream early
4543
// if a failure occurs
4644
let mut found_none = false;

src/option/sum.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ where
3434
where S: Stream<Item = Option<U>> + 'a
3535
{
3636
Box::pin(async move {
37-
pin_utils::pin_mut!(stream);
38-
3937
// Using `scan` here because it is able to stop the stream early
4038
// if a failure occurs
4139
let mut found_none = false;

0 commit comments

Comments
 (0)