@@ -899,25 +899,25 @@ unsafe impl<O, T: ?Sized> StableAddress for OwningRef<O, T> {}
899
899
900
900
impl < O , T : ?Sized > AsRef < T > for OwningRef < O , T > {
901
901
fn as_ref ( & self ) -> & T {
902
- & * self
902
+ self
903
903
}
904
904
}
905
905
906
906
impl < O , T : ?Sized > AsRef < T > for OwningRefMut < O , T > {
907
907
fn as_ref ( & self ) -> & T {
908
- & * self
908
+ self
909
909
}
910
910
}
911
911
912
912
impl < O , T : ?Sized > AsMut < T > for OwningRefMut < O , T > {
913
913
fn as_mut ( & mut self ) -> & mut T {
914
- & mut * self
914
+ self
915
915
}
916
916
}
917
917
918
918
impl < O , T : ?Sized > Borrow < T > for OwningRef < O , T > {
919
919
fn borrow ( & self ) -> & T {
920
- & * self
920
+ self
921
921
}
922
922
}
923
923
@@ -1021,7 +1021,7 @@ where
1021
1021
T : PartialEq ,
1022
1022
{
1023
1023
fn eq ( & self , other : & Self ) -> bool {
1024
- ( & * self as & T ) . eq ( & * other as & T )
1024
+ self . deref ( ) . eq ( other. deref ( ) )
1025
1025
}
1026
1026
}
1027
1027
@@ -1032,7 +1032,7 @@ where
1032
1032
T : PartialOrd ,
1033
1033
{
1034
1034
fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
1035
- ( & * self as & T ) . partial_cmp ( & * other as & T )
1035
+ self . deref ( ) . partial_cmp ( other. deref ( ) )
1036
1036
}
1037
1037
}
1038
1038
@@ -1041,7 +1041,7 @@ where
1041
1041
T : Ord ,
1042
1042
{
1043
1043
fn cmp ( & self , other : & Self ) -> Ordering {
1044
- ( & * self as & T ) . cmp ( & * other as & T )
1044
+ self . deref ( ) . cmp ( other. deref ( ) )
1045
1045
}
1046
1046
}
1047
1047
@@ -1050,7 +1050,7 @@ where
1050
1050
T : Hash ,
1051
1051
{
1052
1052
fn hash < H : Hasher > ( & self , state : & mut H ) {
1053
- ( & * self as & T ) . hash ( state) ;
1053
+ self . deref ( ) . hash ( state) ;
1054
1054
}
1055
1055
}
1056
1056
@@ -1059,7 +1059,7 @@ where
1059
1059
T : PartialEq ,
1060
1060
{
1061
1061
fn eq ( & self , other : & Self ) -> bool {
1062
- ( & * self as & T ) . eq ( & * other as & T )
1062
+ self . deref ( ) . eq ( other. deref ( ) )
1063
1063
}
1064
1064
}
1065
1065
@@ -1070,7 +1070,7 @@ where
1070
1070
T : PartialOrd ,
1071
1071
{
1072
1072
fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
1073
- ( & * self as & T ) . partial_cmp ( & * other as & T )
1073
+ self . deref ( ) . partial_cmp ( other. deref ( ) )
1074
1074
}
1075
1075
}
1076
1076
@@ -1079,7 +1079,7 @@ where
1079
1079
T : Ord ,
1080
1080
{
1081
1081
fn cmp ( & self , other : & Self ) -> Ordering {
1082
- ( & * self as & T ) . cmp ( & * other as & T )
1082
+ self . deref ( ) . cmp ( other. deref ( ) )
1083
1083
}
1084
1084
}
1085
1085
@@ -1088,7 +1088,7 @@ where
1088
1088
T : Hash ,
1089
1089
{
1090
1090
fn hash < H : Hasher > ( & self , state : & mut H ) {
1091
- ( & * self as & T ) . hash ( state) ;
1091
+ self . deref ( ) . hash ( state) ;
1092
1092
}
1093
1093
}
1094
1094
0 commit comments