@@ -549,7 +549,7 @@ impl<P: Deref> Pin<P> {
549
549
/// ruled out by the contract of `Pin::new_unchecked`.
550
550
#[ stable( feature = "pin" , since = "1.33.0" ) ]
551
551
#[ inline( always) ]
552
- pub fn as_ref ( self : & Pin < P > ) -> Pin < & P :: Target > {
552
+ pub fn as_ref ( & self ) -> Pin < & P :: Target > {
553
553
unsafe { Pin :: new_unchecked ( & * self . pointer ) }
554
554
}
555
555
@@ -586,7 +586,7 @@ impl<P: DerefMut> Pin<P> {
586
586
/// ruled out by the contract of `Pin::new_unchecked`.
587
587
#[ stable( feature = "pin" , since = "1.33.0" ) ]
588
588
#[ inline( always) ]
589
- pub fn as_mut ( self : & mut Pin < P > ) -> Pin < & mut P :: Target > {
589
+ pub fn as_mut ( & mut self ) -> Pin < & mut P :: Target > {
590
590
unsafe { Pin :: new_unchecked ( & mut * self . pointer ) }
591
591
}
592
592
@@ -596,7 +596,7 @@ impl<P: DerefMut> Pin<P> {
596
596
/// run before being overwritten, so no pinning guarantee is violated.
597
597
#[ stable( feature = "pin" , since = "1.33.0" ) ]
598
598
#[ inline( always) ]
599
- pub fn set ( self : & mut Pin < P > , value : P :: Target )
599
+ pub fn set ( & mut self , value : P :: Target )
600
600
where
601
601
P :: Target : Sized ,
602
602
{
@@ -621,7 +621,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
621
621
///
622
622
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
623
623
#[ stable( feature = "pin" , since = "1.33.0" ) ]
624
- pub unsafe fn map_unchecked < U , F > ( self : Pin < & ' a T > , func : F ) -> Pin < & ' a U > where
624
+ pub unsafe fn map_unchecked < U , F > ( self , func : F ) -> Pin < & ' a U > where
625
625
F : FnOnce ( & T ) -> & U ,
626
626
{
627
627
let pointer = & * self . pointer ;
@@ -648,7 +648,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
648
648
/// ["pinning projections"]: ../../std/pin/index.html#projections-and-structural-pinning
649
649
#[ stable( feature = "pin" , since = "1.33.0" ) ]
650
650
#[ inline( always) ]
651
- pub fn get_ref ( self : Pin < & ' a T > ) -> & ' a T {
651
+ pub fn get_ref ( self ) -> & ' a T {
652
652
self . pointer
653
653
}
654
654
}
@@ -657,7 +657,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
657
657
/// Converts this `Pin<&mut T>` into a `Pin<&T>` with the same lifetime.
658
658
#[ stable( feature = "pin" , since = "1.33.0" ) ]
659
659
#[ inline( always) ]
660
- pub fn into_ref ( self : Pin < & ' a mut T > ) -> Pin < & ' a T > {
660
+ pub fn into_ref ( self ) -> Pin < & ' a T > {
661
661
Pin { pointer : self . pointer }
662
662
}
663
663
@@ -672,7 +672,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
672
672
/// with the same lifetime as the original `Pin`.
673
673
#[ stable( feature = "pin" , since = "1.33.0" ) ]
674
674
#[ inline( always) ]
675
- pub fn get_mut ( self : Pin < & ' a mut T > ) -> & ' a mut T
675
+ pub fn get_mut ( self ) -> & ' a mut T
676
676
where T : Unpin ,
677
677
{
678
678
self . pointer
@@ -690,7 +690,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
690
690
/// instead.
691
691
#[ stable( feature = "pin" , since = "1.33.0" ) ]
692
692
#[ inline( always) ]
693
- pub unsafe fn get_unchecked_mut ( self : Pin < & ' a mut T > ) -> & ' a mut T {
693
+ pub unsafe fn get_unchecked_mut ( self ) -> & ' a mut T {
694
694
self . pointer
695
695
}
696
696
@@ -710,7 +710,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
710
710
///
711
711
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
712
712
#[ stable( feature = "pin" , since = "1.33.0" ) ]
713
- pub unsafe fn map_unchecked_mut < U , F > ( self : Pin < & ' a mut T > , func : F ) -> Pin < & ' a mut U > where
713
+ pub unsafe fn map_unchecked_mut < U , F > ( self , func : F ) -> Pin < & ' a mut U > where
714
714
F : FnOnce ( & mut T ) -> & mut U ,
715
715
{
716
716
let pointer = Pin :: get_unchecked_mut ( self ) ;
0 commit comments