Skip to content

Upgrading futures-core 0.2 to 0.3

Breaking0.2.1 → 0.3.34Breaking17Security2Platform4Deprecated3New95Changed27Fixed42Other12

BreakingUpgrade verdict

17 breaking changes and 4 platform requirement changes and 2 security fixes.

  • An experimental feature that let code read data before a stream was fully initialized has been removed.
  • Removes the Send bound on the output of RemoteHandle.
  • The `run` method on the thread pool is gone, so code calling it must change.
  • The `poll_seek_relative` method on the buffered reader is no longer available.
Top 5 of 26 that need code or config changes

Requires Rust 1.36 from 0.3.18 (none stated before).

Adds portable-atomic ^1.3.

Drops either.

Breaking17
Removes the unstable read-initializer feature.
read-initializer
Removes the Send bound on the output of RemoteHandle.
RemoteHandleSend
Removes ThreadPool::run.
ThreadPool::run
Removes BufReader::poll_seek_relative.
BufReader::poll_seek_relative
Removes the Stream impl for VecDeque.
StreamVecDeque
Renames Peekable::peek to poll_peek.
Peekable::peekPeekable::poll_peek
Renames oneshot::Sender::poll_cancel to poll_canceled.
oneshot::Sender::poll_canceloneshot::Sender::poll_canceled
Fixes a soundness bug in task::waker_ref, a breaking change allowed because it is a soundness fix.
task::waker_ref
Fixes type inference in sink::unfold by specifying more of its types, which is a breaking change.
sink::unfold
Fixes the signature of the LocalSpawn trait, a breaking change.
LocalSpawn
Changes the Spawn trait and FuturesUnordered::push to take &self.
SpawnFuturesUnordered::push
Moves Spawn and FutureObj out of futures-core and into futures-task.
SpawnFutureObjfutures-corefutures-task
Changes the case convention for feature names.
Moves copy_into and copy_buf_into.
copy_intocopy_buf_into
Changes SinkExt::send_all to accept a TryStream.
SinkExt::send_allTryStream
Changes skip to take a usize rather than a u64.
skip
Fixes a parsing issue in select!/select_biased! that now rejects an odd undocumented syntax previously accepted.
select!select_biased!
Security2
Fixes a soundness issue in the join! and try_join! macros (#2649).
join!try_join!
Fixes a heap buffer overflow in AsyncReadExt::read_to_end and AsyncReadExt::read_to_string.
AsyncReadExt::read_to_endAsyncReadExt::read_to_string
Platform4
Bumps the MSRV of utility crates to Rust 1.71.
Updates to syn 2, raising the MSRV of utility crates to 1.56.
Removes the dependency on proc-macro-hack, raising the MSRV of utility crates to 1.45.
proc-macro-hack
Supports targets that do not have atomic CAS on stable Rust.
Deprecated3
Soft-deprecates the ready! macro in favor of std::task::ready! added in Rust 1.64.
ready!std::task::ready!
Soft-deprecates the pin_mut! macro in favor of std::pin::pin! added in Rust 1.68.
pin_mut!std::pin::pin!
Deprecates FuturesOrdered::push in favor of FuturesOrdered::push_back.
FuturesOrdered::pushFuturesOrdered::push_back