Skip to content

Commit 21aa2f1

Browse files
authored
refactor(common): move common feature cfg in common::task to common::mod (#3492)
1 parent d9c5d3b commit 21aa2f1

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/common/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub(crate) mod buf;
1616
#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
1717
pub(crate) mod date;
1818
pub(crate) mod io;
19+
#[cfg(all(any(feature = "client", feature = "server"), feature = "http1"))]
1920
pub(crate) mod task;
2021
#[cfg(any(
2122
all(feature = "server", feature = "http1"),

src/common/task.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
#[cfg(all(any(feature = "client", feature = "server"), feature = "http1"))]
21
use std::task::{Context, Poll};
32

43
/// A function to help "yield" a future, such that it is re-scheduled immediately.
54
///
65
/// Useful for spin counts, so a future doesn't hog too much time.
7-
#[cfg(all(any(feature = "client", feature = "server"), feature = "http1"))]
86
pub(crate) fn yield_now(cx: &mut Context<'_>) -> Poll<std::convert::Infallible> {
97
cx.waker().wake_by_ref();
108
Poll::Pending

0 commit comments

Comments
 (0)