Skip to content

Commit bdd79b2

Browse files
committed
fix: replace deref_mut with inner_pin
1 parent 478f573 commit bdd79b2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/with_worker_handle.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use core::{
2-
ops::{Deref, DerefMut},
2+
ops::Deref,
33
pin::Pin,
44
task::{Context, Poll},
55
};
@@ -26,9 +26,13 @@ impl<F, H> Deref for WithWorkerHandleFuture<F, H> {
2626
}
2727
}
2828

29-
impl<F, H> DerefMut for WithWorkerHandleFuture<F, H> {
30-
fn deref_mut(&mut self) -> &mut Self::Target {
31-
&mut self.inner
29+
impl<F, H> WithWorkerHandleFuture<F, H> {
30+
pub fn inner_pin(self: Pin<&mut Self>) -> Pin<&mut F> {
31+
self.project().inner
32+
}
33+
34+
pub fn worker_handle(&self) -> &H {
35+
&self.worker_handle
3236
}
3337
}
3438

0 commit comments

Comments
 (0)