Skip to content

Commit fad2aa9

Browse files
committed
preemption: avoid annoying warning that turns into error
1 parent bf811fb commit fad2aa9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tokio/src/league/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ pub(crate) fn ceded() {
6464
}
6565

6666
/// Returns `Poll::Pending` if the current task has exceeded its budget and should yield.
67-
#[allow(unreachable_pub)]
68-
pub fn poll_cooperate(cx: &mut Context<'_>) -> Poll<()> {
67+
pub(crate) fn poll_cooperate(cx: &mut Context<'_>) -> Poll<()> {
6968
HITS.with(|hits| {
7069
let n = hits.get();
7170
if n == 0 {
@@ -92,8 +91,7 @@ pub fn poll_cooperate(cx: &mut Context<'_>) -> Poll<()> {
9291
/// }
9392
/// }
9493
/// ```
95-
#[allow(unreachable_pub)]
96-
pub async fn cooperate() {
94+
pub(crate) async fn cooperate() {
9795
use crate::future::poll_fn;
9896
poll_fn(|cx| poll_cooperate(cx)).await;
9997
}

0 commit comments

Comments
 (0)