Skip to content

Commit 7b5c732

Browse files
taiki-ecramertj
authored andcommitted
Remove try_ready! macro
1 parent 21f1ed3 commit 7b5c732

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

futures-util/src/macros/poll.rs

-16
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/// Extracts the successful type of a `Poll<Result<T, E>>`.
2-
///
3-
/// This macro bakes in propagation of `Pending` and `Err` signals by returning early.
4-
#[macro_export]
5-
macro_rules! try_ready {
6-
($x:expr) => {
7-
match $x {
8-
$crate::core_reexport::task::Poll::Ready(Ok(x)) => x,
9-
$crate::core_reexport::task::Poll::Ready(Err(e)) =>
10-
return $crate::core_reexport::task::Poll::Ready(Err(e.into())),
11-
$crate::core_reexport::task::Poll::Pending =>
12-
return $crate::core_reexport::task::Poll::Pending,
13-
}
14-
}
15-
}
16-
171
/// Extracts the successful type of a `Poll<T>`.
182
///
193
/// This macro bakes in propagation of `Pending` signals by returning early.

futures/src/lib.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ compile_error!("The `never-type` feature requires the `nightly` feature as an ex
6363
#[doc(hidden)] pub use futures_core::task::Poll;
6464

6565
// Macro reexports
66-
pub use futures_util::{
67-
// Error/readiness propagation
68-
try_ready, ready,
69-
};
66+
pub use futures_util::ready; // Readiness propagation
7067
#[cfg(feature = "async-await")]
7168
pub use futures_util::{
7269
// Async-await

0 commit comments

Comments
 (0)