@@ -444,7 +444,7 @@ impl<P: Deref> Pin<P> {
444
444
/// ruled out by the contract of `Pin::new_unchecked`.
445
445
#[ stable( feature = "pin" , since = "1.33.0" ) ]
446
446
#[ inline( always) ]
447
- pub fn as_ref ( self : & Pin < P > ) -> Pin < & P :: Target > {
447
+ pub fn as_ref ( & self ) -> Pin < & P :: Target > {
448
448
unsafe { Pin :: new_unchecked ( & * self . pointer ) }
449
449
}
450
450
@@ -481,7 +481,7 @@ impl<P: DerefMut> Pin<P> {
481
481
/// ruled out by the contract of `Pin::new_unchecked`.
482
482
#[ stable( feature = "pin" , since = "1.33.0" ) ]
483
483
#[ inline( always) ]
484
- pub fn as_mut ( self : & mut Pin < P > ) -> Pin < & mut P :: Target > {
484
+ pub fn as_mut ( & mut self ) -> Pin < & mut P :: Target > {
485
485
unsafe { Pin :: new_unchecked ( & mut * self . pointer ) }
486
486
}
487
487
@@ -491,7 +491,7 @@ impl<P: DerefMut> Pin<P> {
491
491
/// run before being overwritten, so no pinning guarantee is violated.
492
492
#[ stable( feature = "pin" , since = "1.33.0" ) ]
493
493
#[ inline( always) ]
494
- pub fn set ( self : & mut Pin < P > , value : P :: Target )
494
+ pub fn set ( & mut self , value : P :: Target )
495
495
where
496
496
P :: Target : Sized ,
497
497
{
@@ -516,7 +516,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
516
516
///
517
517
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
518
518
#[ stable( feature = "pin" , since = "1.33.0" ) ]
519
- pub unsafe fn map_unchecked < U , F > ( self : Pin < & ' a T > , func : F ) -> Pin < & ' a U > where
519
+ pub unsafe fn map_unchecked < U , F > ( self , func : F ) -> Pin < & ' a U > where
520
520
F : FnOnce ( & T ) -> & U ,
521
521
{
522
522
let pointer = & * self . pointer ;
@@ -543,7 +543,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
543
543
/// ["pinning projections"]: ../../std/pin/index.html#projections-and-structural-pinning
544
544
#[ stable( feature = "pin" , since = "1.33.0" ) ]
545
545
#[ inline( always) ]
546
- pub fn get_ref ( self : Pin < & ' a T > ) -> & ' a T {
546
+ pub fn get_ref ( self ) -> & ' a T {
547
547
self . pointer
548
548
}
549
549
}
@@ -552,7 +552,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
552
552
/// Converts this `Pin<&mut T>` into a `Pin<&T>` with the same lifetime.
553
553
#[ stable( feature = "pin" , since = "1.33.0" ) ]
554
554
#[ inline( always) ]
555
- pub fn into_ref ( self : Pin < & ' a mut T > ) -> Pin < & ' a T > {
555
+ pub fn into_ref ( self ) -> Pin < & ' a T > {
556
556
Pin { pointer : self . pointer }
557
557
}
558
558
@@ -567,7 +567,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
567
567
/// with the same lifetime as the original `Pin`.
568
568
#[ stable( feature = "pin" , since = "1.33.0" ) ]
569
569
#[ inline( always) ]
570
- pub fn get_mut ( self : Pin < & ' a mut T > ) -> & ' a mut T
570
+ pub fn get_mut ( self ) -> & ' a mut T
571
571
where T : Unpin ,
572
572
{
573
573
self . pointer
@@ -585,7 +585,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
585
585
/// instead.
586
586
#[ stable( feature = "pin" , since = "1.33.0" ) ]
587
587
#[ inline( always) ]
588
- pub unsafe fn get_unchecked_mut ( self : Pin < & ' a mut T > ) -> & ' a mut T {
588
+ pub unsafe fn get_unchecked_mut ( self ) -> & ' a mut T {
589
589
self . pointer
590
590
}
591
591
@@ -605,7 +605,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
605
605
///
606
606
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
607
607
#[ stable( feature = "pin" , since = "1.33.0" ) ]
608
- pub unsafe fn map_unchecked_mut < U , F > ( self : Pin < & ' a mut T > , func : F ) -> Pin < & ' a mut U > where
608
+ pub unsafe fn map_unchecked_mut < U , F > ( self , func : F ) -> Pin < & ' a mut U > where
609
609
F : FnOnce ( & mut T ) -> & mut U ,
610
610
{
611
611
let pointer = Pin :: get_unchecked_mut ( self ) ;
0 commit comments