@@ -215,7 +215,7 @@ impl Waker {
215215 // Don't call `drop` -- the waker will be consumed by `wake`.
216216 crate :: mem:: forget ( self ) ;
217217
218- // SAFETY: This is safe because `Waker::new_unchecked ` is the only way
218+ // SAFETY: This is safe because `Waker::from_raw ` is the only way
219219 // to initialize `wake` and `data` requiring the user to acknowledge
220220 // that the contract of `RawWaker` is upheld.
221221 unsafe { ( wake) ( data) } ;
@@ -253,7 +253,7 @@ impl Waker {
253253 /// in [`RawWaker`]'s and [`RawWakerVTable`]'s documentation is not upheld.
254254 /// Therefore this method is unsafe.
255255 #[ inline]
256- pub unsafe fn new_unchecked ( waker : RawWaker ) -> Waker {
256+ pub unsafe fn from_raw ( waker : RawWaker ) -> Waker {
257257 Waker {
258258 waker,
259259 }
@@ -264,7 +264,7 @@ impl Clone for Waker {
264264 #[ inline]
265265 fn clone ( & self ) -> Self {
266266 Waker {
267- // SAFETY: This is safe because `Waker::new_unchecked ` is the only way
267+ // SAFETY: This is safe because `Waker::from_raw ` is the only way
268268 // to initialize `clone` and `data` requiring the user to acknowledge
269269 // that the contract of [`RawWaker`] is upheld.
270270 waker : unsafe { ( self . waker . vtable . clone ) ( self . waker . data ) } ,
@@ -275,7 +275,7 @@ impl Clone for Waker {
275275impl Drop for Waker {
276276 #[ inline]
277277 fn drop ( & mut self ) {
278- // SAFETY: This is safe because `Waker::new_unchecked ` is the only way
278+ // SAFETY: This is safe because `Waker::from_raw ` is the only way
279279 // to initialize `drop` and `data` requiring the user to acknowledge
280280 // that the contract of `RawWaker` is upheld.
281281 unsafe { ( self . waker . vtable . drop ) ( self . waker . data ) }
0 commit comments