Skip to content

Commit 5376b55

Browse files
committed
remove macro from vec::from_stream
Signed-off-by: Yoshua Wuyts <[email protected]>
1 parent b1c0758 commit 5376b55

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/vec/from_stream.rs

+3-18
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
1-
use cfg_if::cfg_if;
2-
31
use crate::stream::{FromStream, IntoStream, Stream};
42

53
use std::pin::Pin;
64

7-
cfg_if! {
8-
if #[cfg(feature = "docs")] {
9-
#[doc(hidden)]
10-
pub struct DynFuture<'a, T>(std::marker::PhantomData<&'a T>);
11-
12-
macro_rules! dyn_ret {
13-
($a:lifetime, $o:ty) => (DynFuture<$a, $o>);
14-
}
15-
} else {
16-
macro_rules! dyn_ret {
17-
($a:lifetime, $o:ty) => (Pin<Box<dyn core::future::Future<Output = $o> + Send + 'a>>)
18-
}
19-
}
20-
}
21-
225
impl<T: Unpin + Sized + Send> FromStream<T> for Vec<T> {
236
#[inline]
24-
fn from_stream<'a, S: IntoStream<Item = T>>(stream: S) -> dyn_ret!('a, Self)
7+
fn from_stream<'a, S: IntoStream<Item = T>>(
8+
stream: S,
9+
) -> Pin<Box<dyn core::future::Future<Output = Self> + Send + 'a>>
2510
where
2611
<S as IntoStream>::IntoStream: Send + 'a,
2712
{

0 commit comments

Comments
 (0)