Skip to content

Commit

Permalink
feat: Make the stream module no_std
Browse files Browse the repository at this point in the history
  • Loading branch information
k-nasa committed Jan 16, 2020
1 parent 5820bc5 commit 110aabb
Show file tree
Hide file tree
Showing 71 changed files with 143 additions and 143 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/stream/double_ended_stream/next_back.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
6 changes: 3 additions & 3 deletions src/stream/double_ended_stream/nth_back.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/stream/double_ended_stream/rfind.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/stream/double_ended_stream/rfold.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/double_ended_stream/try_rfold.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/stream/empty.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/stream/extend.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use crate::future::Future;
use crate::stream::IntoStream;
Expand Down
2 changes: 1 addition & 1 deletion src/stream/from_fn.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use crate::stream::Stream;
use crate::task::{Context, Poll};
Expand Down
2 changes: 1 addition & 1 deletion src/stream/from_iter.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use pin_project_lite::pin_project;

Expand Down
4 changes: 2 additions & 2 deletions src/stream/from_stream.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::future::Future;
use std::pin::Pin;
use core::future::Future;
use core::pin::Pin;

use crate::stream::IntoStream;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/once.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use pin_project_lite::pin_project;

Expand Down
6 changes: 3 additions & 3 deletions src/stream/pending.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
4 changes: 2 additions & 2 deletions src/stream/product.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::pin::Pin;
use std::future::Future;
use core::pin::Pin;
use core::future::Future;

use crate::stream::Stream;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/repeat.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use crate::stream::Stream;
use crate::task::{Context, Poll};
Expand Down
2 changes: 1 addition & 1 deletion src/stream/repeat_with.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use crate::stream::Stream;
use crate::task::{Context, Poll};
Expand Down
6 changes: 3 additions & 3 deletions src/stream/stream/all.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
6 changes: 3 additions & 3 deletions src/stream/stream/any.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/stream/stream/chain.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use pin_project_lite::pin_project;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/stream/cloned.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/stream/stream/cmp.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/stream/copied.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/stream/stream/count.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/stream/stream/cycle.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
6 changes: 3 additions & 3 deletions src/stream/stream/delay.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/stream/enumerate.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use pin_project_lite::pin_project;

Expand Down
4 changes: 2 additions & 2 deletions src/stream/stream/eq.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/stream/filter.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use pin_project_lite::pin_project;

Expand Down
4 changes: 2 additions & 2 deletions src/stream/stream/filter_map.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/stream/stream/find.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
6 changes: 3 additions & 3 deletions src/stream/stream/find_map.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/stream/flat_map.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use pin_project_lite::pin_project;

Expand Down
4 changes: 2 additions & 2 deletions src/stream/stream/flatten.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::fmt;
use std::pin::Pin;
use core::fmt;
use core::pin::Pin;

use pin_project_lite::pin_project;

Expand Down
4 changes: 2 additions & 2 deletions src/stream/stream/fold.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/stream/stream/for_each.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/stream/fuse.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use pin_project_lite::pin_project;

Expand Down
6 changes: 3 additions & 3 deletions src/stream/stream/ge.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/stream/stream/gt.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/stream/inspect.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use pin_project_lite::pin_project;

Expand Down
4 changes: 2 additions & 2 deletions src/stream/stream/last.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/stream/stream/le.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/stream/stream/lt.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/stream/map.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::pin::Pin;
use core::pin::Pin;

use pin_project_lite::pin_project;

Expand Down
8 changes: 4 additions & 4 deletions src/stream/stream/max.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/stream/stream/max_by.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/stream/stream/max_by_key.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Loading

0 comments on commit 110aabb

Please sign in to comment.