Skip to content

Commit 0e9a20f

Browse files
committedJul 14, 2020
Remove unnecessary type hints from the Wake impl
1 parent 4a689da commit 0e9a20f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎src/liballoc/task.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,13 @@ fn raw_waker<W: Wake + Send + Sync + 'static>(waker: Arc<W>) -> RawWaker {
6969

7070
// Wake by value, moving the Arc into the Wake::wake function
7171
unsafe fn wake<W: Wake + Send + Sync + 'static>(waker: *const ()) {
72-
let waker: Arc<W> = unsafe { Arc::from_raw(waker as *const W) };
72+
let waker = unsafe { Arc::from_raw(waker as *const W) };
7373
<W as Wake>::wake(waker);
7474
}
7575

7676
// Wake by reference, wrap the waker in ManuallyDrop to avoid dropping it
7777
unsafe fn wake_by_ref<W: Wake + Send + Sync + 'static>(waker: *const ()) {
78-
let waker: ManuallyDrop<Arc<W>> =
79-
unsafe { ManuallyDrop::new(Arc::from_raw(waker as *const W)) };
78+
let waker = unsafe { ManuallyDrop::new(Arc::from_raw(waker as *const W)) };
8079
<W as Wake>::wake_by_ref(&waker);
8180
}
8281

0 commit comments

Comments
 (0)
Please sign in to comment.