Skip to content

Commit

Permalink
Misc fixes except for 1.45 backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
olegnn committed Mar 12, 2022
1 parent f415bab commit 49f1b08
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion futures-util/src/stream/stream/flatten_unordered.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use alloc::sync::Arc;
use alloc::{boxed::Box, sync::Arc};
use core::{
cell::UnsafeCell,
convert::identity,
Expand Down
3 changes: 3 additions & 0 deletions futures-util/src/stream/try_stream/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ mod try_flatten;
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/57411
pub use self::try_flatten::TryFlatten;

#[cfg(feature = "alloc")]
mod try_flatten_unordered;
#[cfg(feature = "alloc")]
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/57411
pub use self::try_flatten_unordered::TryFlattenUnordered;

Expand Down Expand Up @@ -676,6 +678,7 @@ pub trait TryStreamExt: TryStream {
/// assert_eq!(values, vec![Ok(1), Ok(2), Ok(4), Err(3), Err(5)]);
/// # });
/// ```
#[cfg(feature = "alloc")]
fn try_flatten_unordered(self, limit: impl Into<Option<usize>>) -> TryFlattenUnordered<Self>
where
Self: TryStream,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ impl<S, Item> Sink<Item> for TryFlattenSuccessful<S>
where
S: TryStream + Sink<Item>,
S::Ok: TryStream,
S::Ok: Stream<Item = Result<<S::Ok as TryStream>::Ok, <S::Ok as TryStream>::Error>>,
<S::Ok as TryStream>::Error: From<<S as TryStream>::Error>,
{
type Error = <S as Sink<Item>>::Error;
Expand Down

0 comments on commit 49f1b08

Please sign in to comment.