Skip to content

v0.99.6

Compare
Choose a tag to compare
@yoshuawuyts yoshuawuyts released this 19 Sep 13:45
4719435

This release adds several new combinators, a work-stealing executor, and the ability to collect streams using IntoStream and FromStream.

Additionally async-attributes 1.0 has been released which adds support for async fn main, #[test] async fn, and #[bench] async fn.

Example

let a = stream::once(1u8);
let b = stream::once(2u8);
let c = stream::once(3u8);

let s = stream::join!(a, b, c);

assert_eq!(s.collect().await, vec![1u8, 2u8, 3u8]));

Added

  • Added stream::Stream::collect as "unstable"
  • Added stream::Stream::enumerate
  • Added stream::Stream::fuse
  • Added stream::Stream::fold
  • Added stream::Stream::scan
  • Added stream::Stream::zip
  • Added stream::join macro as "unstable"
  • Added stream::DoubleEndedStream as "unstable"
  • Added stream::FromStream trait as "unstable"
  • Added stream::IntoStream trait as "unstable"
  • Added io::Cursor as "unstable"
  • Added io::BufRead::consume method
  • Added io::repeat
  • Added io::Slice and io::SliceMut
  • Added documentation for feature flags
  • Added pin submodule as "unstable"
  • Added the ability to collect a stream of Result<T, E>s into a
    Result<impl FromStream<T>, E>

Changed

  • Refactored the scheduling algorithm of our executor to use work stealing
  • Refactored the network driver, removing 400 lines of code
  • Removed the Send bound from task::block_on
  • Removed Unpin bound from impl<T: futures::stream::Stream> Stream for T