@@ -533,7 +533,7 @@ impl<P: Deref> Pin<P> {
533
533
/// ruled out by the contract of `Pin::new_unchecked`.
534
534
#[ stable( feature = "pin" , since = "1.33.0" ) ]
535
535
#[ inline( always) ]
536
- pub fn as_ref ( self : & Pin < P > ) -> Pin < & P :: Target > {
536
+ pub fn as_ref ( & self ) -> Pin < & P :: Target > {
537
537
unsafe { Pin :: new_unchecked ( & * self . pointer ) }
538
538
}
539
539
@@ -570,7 +570,7 @@ impl<P: DerefMut> Pin<P> {
570
570
/// ruled out by the contract of `Pin::new_unchecked`.
571
571
#[ stable( feature = "pin" , since = "1.33.0" ) ]
572
572
#[ inline( always) ]
573
- pub fn as_mut ( self : & mut Pin < P > ) -> Pin < & mut P :: Target > {
573
+ pub fn as_mut ( & mut self ) -> Pin < & mut P :: Target > {
574
574
unsafe { Pin :: new_unchecked ( & mut * self . pointer ) }
575
575
}
576
576
@@ -580,7 +580,7 @@ impl<P: DerefMut> Pin<P> {
580
580
/// run before being overwritten, so no pinning guarantee is violated.
581
581
#[ stable( feature = "pin" , since = "1.33.0" ) ]
582
582
#[ inline( always) ]
583
- pub fn set ( self : & mut Pin < P > , value : P :: Target )
583
+ pub fn set ( & mut self , value : P :: Target )
584
584
where
585
585
P :: Target : Sized ,
586
586
{
@@ -605,7 +605,7 @@ impl<'a, T: ?Sized> Pin<&'a 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 < U , F > ( self : Pin < & ' a T > , func : F ) -> Pin < & ' a U > where
608
+ pub unsafe fn map_unchecked < U , F > ( self , func : F ) -> Pin < & ' a U > where
609
609
F : FnOnce ( & T ) -> & U ,
610
610
{
611
611
let pointer = & * self . pointer ;
@@ -632,7 +632,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
632
632
/// ["pinning projections"]: ../../std/pin/index.html#projections-and-structural-pinning
633
633
#[ stable( feature = "pin" , since = "1.33.0" ) ]
634
634
#[ inline( always) ]
635
- pub fn get_ref ( self : Pin < & ' a T > ) -> & ' a T {
635
+ pub fn get_ref ( self ) -> & ' a T {
636
636
self . pointer
637
637
}
638
638
}
@@ -641,7 +641,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
641
641
/// Converts this `Pin<&mut T>` into a `Pin<&T>` with the same lifetime.
642
642
#[ stable( feature = "pin" , since = "1.33.0" ) ]
643
643
#[ inline( always) ]
644
- pub fn into_ref ( self : Pin < & ' a mut T > ) -> Pin < & ' a T > {
644
+ pub fn into_ref ( self ) -> Pin < & ' a T > {
645
645
Pin { pointer : self . pointer }
646
646
}
647
647
@@ -656,7 +656,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
656
656
/// with the same lifetime as the original `Pin`.
657
657
#[ stable( feature = "pin" , since = "1.33.0" ) ]
658
658
#[ inline( always) ]
659
- pub fn get_mut ( self : Pin < & ' a mut T > ) -> & ' a mut T
659
+ pub fn get_mut ( self ) -> & ' a mut T
660
660
where T : Unpin ,
661
661
{
662
662
self . pointer
@@ -674,7 +674,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
674
674
/// instead.
675
675
#[ stable( feature = "pin" , since = "1.33.0" ) ]
676
676
#[ inline( always) ]
677
- pub unsafe fn get_unchecked_mut ( self : Pin < & ' a mut T > ) -> & ' a mut T {
677
+ pub unsafe fn get_unchecked_mut ( self ) -> & ' a mut T {
678
678
self . pointer
679
679
}
680
680
@@ -694,7 +694,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
694
694
///
695
695
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
696
696
#[ stable( feature = "pin" , since = "1.33.0" ) ]
697
- pub unsafe fn map_unchecked_mut < U , F > ( self : Pin < & ' a mut T > , func : F ) -> Pin < & ' a mut U > where
697
+ pub unsafe fn map_unchecked_mut < U , F > ( self , func : F ) -> Pin < & ' a mut U > where
698
698
F : FnOnce ( & mut T ) -> & mut U ,
699
699
{
700
700
let pointer = Pin :: get_unchecked_mut ( self ) ;
0 commit comments