Skip to content

Commit 47a3ea1

Browse files
committed
Remove Future from UseWaker
1 parent 5c1bf5b commit 47a3ea1

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

packages/hooks/src/use_waker.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,6 @@ impl<T: Clone + 'static> UseWaker<T> {
5050
}
5151
}
5252

53-
// Can await the waker to be woken.
54-
// We use `.peek()` here to avoid reacting to changes in the underlying task_rx which could lead
55-
// to an effect/future loop.
56-
impl<T: Clone + 'static> std::future::Future for UseWaker<T> {
57-
type Output = Result<T, Canceled>;
58-
59-
fn poll(
60-
self: std::pin::Pin<&mut Self>,
61-
cx: &mut std::task::Context<'_>,
62-
) -> std::task::Poll<Self::Output> {
63-
self.task_rx.peek().clone().poll_unpin(cx)
64-
}
65-
}
66-
6753
impl<T> Copy for UseWaker<T> {}
6854
impl<T> Clone for UseWaker<T> {
6955
fn clone(&self) -> Self {

0 commit comments

Comments
 (0)