Skip to content

Commit c413fcb

Browse files
committed
attempt to fix Send guards on collect
Signed-off-by: Yoshua Wuyts <[email protected]>
1 parent 1f78efe commit c413fcb

File tree

14 files changed

+38
-16
lines changed

14 files changed

+38
-16
lines changed

src/collections/binary_heap/from_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::pin::Pin;
44
use crate::prelude::*;
55
use crate::stream::{self, FromStream, IntoStream};
66

7-
impl<T: Ord> FromStream<T> for BinaryHeap<T> {
7+
impl<T: Ord + Send> FromStream<T> for BinaryHeap<T> {
88
#[inline]
99
fn from_stream<'a, S: IntoStream<Item = T> + 'a>(
1010
stream: S,

src/collections/btree_map/from_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::pin::Pin;
44
use crate::prelude::*;
55
use crate::stream::{self, FromStream, IntoStream};
66

7-
impl<K: Ord, V> FromStream<(K, V)> for BTreeMap<K, V> {
7+
impl<K: Ord + Send, V: Send> FromStream<(K, V)> for BTreeMap<K, V> {
88
#[inline]
99
fn from_stream<'a, S: IntoStream<Item = (K, V)> + 'a>(
1010
stream: S,

src/collections/btree_set/from_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::pin::Pin;
44
use crate::prelude::*;
55
use crate::stream::{self, FromStream, IntoStream};
66

7-
impl<T: Ord> FromStream<T> for BTreeSet<T> {
7+
impl<T: Ord + Send> FromStream<T> for BTreeSet<T> {
88
#[inline]
99
fn from_stream<'a, S: IntoStream<Item = T> + 'a>(
1010
stream: S,

src/collections/hash_map/from_stream.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ use crate::stream::{self, FromStream, IntoStream};
77

88
impl<K, V, H> FromStream<(K, V)> for HashMap<K, V, H>
99
where
10-
K: Eq + Hash,
10+
K: Eq + Hash + Send,
1111
H: BuildHasher + Default,
12+
V: Send,
1213
{
1314
#[inline]
1415
fn from_stream<'a, S: IntoStream<Item = (K, V)> + 'a>(

src/collections/hash_set/from_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::stream::{self, FromStream, IntoStream};
77

88
impl<T, H> FromStream<T> for HashSet<T, H>
99
where
10-
T: Eq + Hash,
10+
T: Eq + Hash + Send,
1111
H: BuildHasher + Default,
1212
{
1313
#[inline]

src/collections/linked_list/from_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::pin::Pin;
44
use crate::prelude::*;
55
use crate::stream::{self, FromStream, IntoStream};
66

7-
impl<T> FromStream<T> for LinkedList<T> {
7+
impl<T: Send> FromStream<T> for LinkedList<T> {
88
#[inline]
99
fn from_stream<'a, S: IntoStream<Item = T> + 'a>(
1010
stream: S,

src/collections/vec_deque/from_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::pin::Pin;
44
use crate::prelude::*;
55
use crate::stream::{self, FromStream, IntoStream};
66

7-
impl<T> FromStream<T> for VecDeque<T> {
7+
impl<T: Send> FromStream<T> for VecDeque<T> {
88
#[inline]
99
fn from_stream<'a, S: IntoStream<Item = T> + 'a>(
1010
stream: S,

src/option/from_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::pin::Pin;
33
use crate::prelude::*;
44
use crate::stream::{FromStream, IntoStream};
55

6-
impl<T, V> FromStream<Option<T>> for Option<V>
6+
impl<T: Send, V> FromStream<Option<T>> for Option<V>
77
where
88
V: FromStream<T>,
99
{

src/path/pathbuf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ impl<P: AsRef<Path>> stream::Extend<P> for PathBuf {
337337
}
338338

339339
#[cfg(feature = "unstable")]
340-
impl<'b, P: AsRef<Path> + 'b> FromStream<P> for PathBuf {
340+
impl<'b, P: AsRef<Path> + 'b + Send> FromStream<P> for PathBuf {
341341
#[inline]
342342
fn from_stream<'a, S: IntoStream<Item = P> + 'a>(
343343
stream: S,

src/result/from_stream.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ use crate::stream::{FromStream, IntoStream};
55

66
impl<T, E, V> FromStream<Result<T, E>> for Result<V, E>
77
where
8+
T: Send,
9+
E: Send,
810
V: FromStream<T>,
911
{
1012
/// Takes each element in the stream: if it is an `Err`, no further

0 commit comments

Comments
 (0)
close