feat: Make the stream module no_std

pull/680/head
k-nasa 5 years ago
parent 880b7ee987
commit d622ec5d35

@ -42,13 +42,13 @@ std = [
"futures-io",
"memchr",
"once_cell",
"pin-project-lite",
"pin-utils",
"slab",
"no-std",
]
no-std = [
"futures-core",
"pin-project-lite",
]
[dependencies]

@ -244,13 +244,13 @@ mod macros;
cfg_no_std! {
pub mod task;
pub mod future;
pub mod stream;
}
cfg_std! {
pub mod io;
pub mod os;
pub mod prelude;
pub mod stream;
pub mod sync;
}

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::future::Future;
use core::pin::Pin;
use core::future::Future;
use crate::stream::DoubleEndedStream;
use crate::task::{Context, Poll};

@ -1,6 +1,6 @@
use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
use core::future::Future;
use core::pin::Pin;
use core::task::{Context, Poll};
use crate::stream::DoubleEndedStream;

@ -1,6 +1,6 @@
use std::task::{Context, Poll};
use std::future::Future;
use std::pin::Pin;
use core::task::{Context, Poll};
use core::future::Future;
use core::pin::Pin;
use crate::stream::DoubleEndedStream;

@ -1,6 +1,6 @@
use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
use core::future::Future;
use core::pin::Pin;
use core::task::{Context, Poll};
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use crate::future::Future;
use std::pin::Pin;
use core::pin::Pin;
use crate::task::{Context, Poll};
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::marker::PhantomData;
use std::pin::Pin;
use core::marker::PhantomData;
use core::pin::Pin;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use crate::future::Future;
use crate::stream::IntoStream;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;
use crate::stream::IntoStream;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,6 +1,6 @@
use std::marker::PhantomData;
use std::pin::Pin;
use std::task::{Context, Poll};
use core::marker::PhantomData;
use core::pin::Pin;
use core::task::{Context, Poll};
use crate::stream::{DoubleEndedStream, ExactSizeStream, FusedStream, Stream};

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::future::Future;
use core::pin::Pin;
use core::future::Future;
use crate::stream::Stream;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,6 +1,6 @@
use std::marker::PhantomData;
use std::pin::Pin;
use std::future::Future;
use core::marker::PhantomData;
use core::pin::Pin;
use core::future::Future;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,6 +1,6 @@
use std::marker::PhantomData;
use std::pin::Pin;
use std::future::Future;
use core::marker::PhantomData;
use core::pin::Pin;
use core::future::Future;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,7 +1,7 @@
use crate::stream::Stream;
use crate::task::{Context, Poll};
use pin_project_lite::pin_project;
use std::pin::Pin;
use core::pin::Pin;
pin_project! {
/// A stream that clones the elements of an underlying stream.

@ -1,6 +1,6 @@
use std::cmp::Ordering;
use std::future::Future;
use std::pin::Pin;
use core::cmp::Ordering;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,7 +1,7 @@
use crate::stream::Stream;
use crate::task::{Context, Poll};
use pin_project_lite::pin_project;
use std::pin::Pin;
use core::pin::Pin;
pin_project! {
/// A stream that copies the elements of an underlying stream.

@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::mem::ManuallyDrop;
use std::pin::Pin;
use core::mem::ManuallyDrop;
use core::pin::Pin;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,6 +1,6 @@
use std::future::Future;
use std::pin::Pin;
use std::time::Duration;
use core::future::Future;
use core::pin::Pin;
use core::time::Duration;
use pin_project_lite::pin_project;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::task::{Context, Poll};
use core::pin::Pin;
use core::task::{Context, Poll};
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,6 +1,6 @@
use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
use core::future::Future;
use core::pin::Pin;
use core::task::{Context, Poll};
use crate::stream::Stream;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::fmt;
use std::pin::Pin;
use core::fmt;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::future::Future;
use core::pin::Pin;
use core::future::Future;
use pin_project_lite::pin_project;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,6 +1,6 @@
use std::cmp::Ordering;
use std::future::Future;
use std::pin::Pin;
use core::cmp::Ordering;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,6 +1,6 @@
use std::cmp::Ordering;
use std::future::Future;
use std::pin::Pin;
use core::cmp::Ordering;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,6 +1,6 @@
use std::cmp::Ordering;
use std::future::Future;
use std::pin::Pin;
use core::cmp::Ordering;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,6 +1,6 @@
use std::cmp::Ordering;
use std::future::Future;
use std::pin::Pin;
use core::cmp::Ordering;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,7 +1,7 @@
use std::cmp::{Ord, Ordering};
use std::marker::PhantomData;
use std::pin::Pin;
use std::future::Future;
use core::cmp::{Ord, Ordering};
use core::marker::PhantomData;
use core::pin::Pin;
use core::future::Future;
use pin_project_lite::pin_project;

@ -1,6 +1,6 @@
use std::cmp::Ordering;
use std::pin::Pin;
use std::future::Future;
use core::cmp::Ordering;
use core::pin::Pin;
use core::future::Future;
use pin_project_lite::pin_project;

@ -1,6 +1,6 @@
use std::cmp::Ordering;
use std::future::Future;
use std::pin::Pin;
use core::cmp::Ordering;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::task::{Context, Poll};
use core::pin::Pin;
use core::task::{Context, Poll};
use pin_project_lite::pin_project;

@ -1,7 +1,7 @@
use std::cmp::{Ord, Ordering};
use std::marker::PhantomData;
use std::pin::Pin;
use std::future::Future;
use core::cmp::{Ord, Ordering};
use core::marker::PhantomData;
use core::pin::Pin;
use core::future::Future;
use pin_project_lite::pin_project;

@ -1,6 +1,6 @@
use std::cmp::Ordering;
use std::pin::Pin;
use std::future::Future;
use core::cmp::Ordering;
use core::pin::Pin;
use core::future::Future;
use pin_project_lite::pin_project;

@ -1,6 +1,6 @@
use std::cmp::Ordering;
use std::future::Future;
use std::pin::Pin;
use core::cmp::Ordering;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -110,12 +110,12 @@ pub use take::Take;
pub use take_while::TakeWhile;
pub use zip::Zip;
use std::cmp::Ordering;
use core::cmp::Ordering;
cfg_unstable! {
use std::future::Future;
use std::pin::Pin;
use std::time::Duration;
use core::future::Future;
use core::pin::Pin;
use core::time::Duration;
use crate::stream::into_stream::IntoStream;
use crate::stream::{FromStream, Product, Sum};

@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::future::Future;
use core::pin::Pin;
use core::future::Future;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,6 +1,6 @@
use std::pin::Pin;
use std::task::{Context, Poll};
use std::future::Future;
use core::pin::Pin;
use core::task::{Context, Poll};
use core::future::Future;
use crate::stream::Stream;

@ -1,6 +1,6 @@
use std::cmp::Ordering;
use std::future::Future;
use std::pin::Pin;
use core::cmp::Ordering;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,7 +1,7 @@
use pin_project_lite::pin_project;
use std::default::Default;
use std::future::Future;
use std::pin::Pin;
use core::default::Default;
use core::future::Future;
use core::pin::Pin;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::task::{Context, Poll};
use core::pin::Pin;
use core::task::{Context, Poll};
use pin_project_lite::pin_project;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,8 +1,8 @@
use std::error::Error;
use std::fmt;
use std::future::Future;
use std::pin::Pin;
use std::time::Duration;
use std::future::Future;
use futures_timer::Delay;
use pin_project_lite::pin_project;

@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;
use crate::future::Future;
use crate::stream::Stream;

@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::fmt;
use std::pin::Pin;
use core::fmt;
use core::pin::Pin;
use pin_project_lite::pin_project;

@ -1,5 +1,5 @@
use std::mem;
use std::pin::Pin;
use core::mem;
use core::pin::Pin;
use crate::stream::Stream;
use crate::task::{Context, Poll};

@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;
use crate::stream::Stream;

Loading…
Cancel
Save