Skip to content

Commit b9bcedf

Browse files
taiki-ecramertj
authored andcommitted
Remove futures-core dependency from futures-sink
1 parent 40c32d0 commit b9bcedf

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

futures-sink/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ name = "futures_sink"
1616

1717
[features]
1818
default = ["std"]
19-
std = ["alloc", "futures-core-preview/std"]
20-
alloc = ["futures-core-preview/alloc"]
19+
std = ["alloc"]
20+
alloc = []
2121

2222
[dependencies]
23-
futures-core-preview = { path = "../futures-core", version = "=0.3.0-alpha.18", default-features = false }

futures-sink/src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#[cfg(feature = "alloc")]
1717
extern crate alloc;
1818

19-
use futures_core::task::{Context, Poll};
2019
use core::ops::DerefMut;
2120
use core::pin::Pin;
21+
use core::task::{Context, Poll};
2222

2323
/// A `Sink` is a value into which other values can be sent, asynchronously.
2424
///
@@ -84,8 +84,7 @@ pub trait Sink<Item> {
8484
///
8585
/// In most cases, if the sink encounters an error, the sink will
8686
/// permanently be unable to receive items.
87-
fn start_send(self: Pin<&mut Self>, item: Item)
88-
-> Result<(), Self::Error>;
87+
fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), Self::Error>;
8988

9089
/// Flush any remaining output from this sink.
9190
///
@@ -162,7 +161,7 @@ where
162161
#[cfg(feature = "alloc")]
163162
mod if_alloc {
164163
use super::*;
165-
use futures_core::never::Never;
164+
use core::convert::Infallible as Never;
166165

167166
impl<T> Sink<T> for alloc::vec::Vec<T> {
168167
type Error = Never;

0 commit comments

Comments
 (0)