Skip to content

Commit 5e8c6c3

Browse files
committed
Fix other compat issues
1 parent ec8b26a commit 5e8c6c3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

futures-executor/src/local_pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn run_executor<T, F: FnMut(&Waker) -> Poll<T>>(mut f: F) -> T {
6767
another executor");
6868

6969
CURRENT_THREAD_NOTIFY.with(|thread_notify| {
70-
let waker: WakerRef = waker_ref(thread_notify);
70+
let waker: WakerRef<'_> = waker_ref(thread_notify);
7171
loop {
7272
if let Poll::Ready(t) = f(&waker) {
7373
return t;

futures-util/src/compat/compat01as03.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl<T> Compat01As03<T> {
2929
}
3030

3131
fn in_notify<R>(&mut self, waker: &Waker, f: impl FnOnce(&mut T) -> R) -> R {
32-
let notify = &WakerToHandle(waker.as_waker());
32+
let notify = &WakerToHandle(waker);
3333
self.inner.poll_fn_notify(notify, 0, f)
3434
}
3535
}

futures-util/src/compat/compat03as01.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use futures_core::{
88
};
99
use futures_sink::Sink as Sink03;
1010
use crate::task::ArcWake as ArcWake03;
11-
use std::{marker::PhantomData, ops::Deref, pin::Pin, ptr::NonNull, sync::Arc};
11+
use std::{pin::Pin, sync::Arc};
1212

1313
/// Converts a futures 0.3 [`TryFuture`](futures_core::future::TryFuture),
1414
/// [`TryStream`](futures_core::stream::TryStream) or
@@ -115,7 +115,7 @@ impl Current {
115115
Current(task01::current())
116116
}
117117

118-
fn as_waker(&self) -> Waker {
118+
fn as_waker(&self) -> task03::Waker {
119119
// For simplicity reasons wrap the Waker into an Arc.
120120
// We can optimize this again later on and reintroduce WakerLt<'a> which
121121
// derefs to Waker, and where cloning it through RawWakerVTable returns

0 commit comments

Comments
 (0)