@@ -120,7 +120,7 @@ struct ColumnMeta<'a> {
120
120
org_name : RawBytes < ' a , LenEnc > ,
121
121
}
122
122
123
- impl < ' a > ColumnMeta < ' a > {
123
+ impl ColumnMeta < ' _ > {
124
124
pub fn into_owned ( self ) -> ColumnMeta < ' static > {
125
125
ColumnMeta {
126
126
schema : self . schema . into_owned ( ) ,
@@ -428,7 +428,7 @@ pub struct SessionStateInfo<'a> {
428
428
data : RawBytes < ' a , LenEnc > ,
429
429
}
430
430
431
- impl < ' a > SessionStateInfo < ' a > {
431
+ impl SessionStateInfo < ' _ > {
432
432
pub fn into_owned ( self ) -> SessionStateInfo < ' static > {
433
433
let SessionStateInfo { data_type, data } = self ;
434
434
SessionStateInfo {
@@ -678,7 +678,7 @@ pub struct OkPacket<'a> {
678
678
session_state_info : Option < RawBytes < ' a , LenEnc > > ,
679
679
}
680
680
681
- impl < ' a > OkPacket < ' a > {
681
+ impl OkPacket < ' _ > {
682
682
pub fn into_owned ( self ) -> OkPacket < ' static > {
683
683
OkPacket {
684
684
affected_rows : self . affected_rows ,
@@ -864,7 +864,7 @@ impl MySerialize for ProgressReport<'_> {
864
864
}
865
865
}
866
866
867
- impl < ' a > fmt:: Display for ProgressReport < ' a > {
867
+ impl fmt:: Display for ProgressReport < ' _ > {
868
868
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
869
869
write ! (
870
870
f,
@@ -892,7 +892,7 @@ pub enum ErrPacket<'a> {
892
892
Progress ( ProgressReport < ' a > ) ,
893
893
}
894
894
895
- impl < ' a > ErrPacket < ' a > {
895
+ impl ErrPacket < ' _ > {
896
896
/// Returns false if this error packet contains progress report.
897
897
pub fn is_error ( & self ) -> bool {
898
898
matches ! ( self , ErrPacket :: Error { .. } )
@@ -957,7 +957,7 @@ impl MySerialize for ErrPacket<'_> {
957
957
}
958
958
}
959
959
960
- impl < ' a > fmt:: Display for ErrPacket < ' a > {
960
+ impl fmt:: Display for ErrPacket < ' _ > {
961
961
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
962
962
match self {
963
963
ErrPacket :: Error ( server_error) => write ! ( f, "{}" , server_error) ,
@@ -1190,7 +1190,7 @@ pub enum AuthPluginData<'a> {
1190
1190
Clear ( Cow < ' a , [ u8 ] > ) ,
1191
1191
}
1192
1192
1193
- impl < ' a > AuthPluginData < ' a > {
1193
+ impl AuthPluginData < ' _ > {
1194
1194
pub fn into_owned ( self ) -> AuthPluginData < ' static > {
1195
1195
match self {
1196
1196
AuthPluginData :: Old ( x) => AuthPluginData :: Old ( x) ,
@@ -1667,6 +1667,7 @@ impl MySerialize for HandshakePacket<'_> {
1667
1667
}
1668
1668
1669
1669
impl < ' a > HandshakePacket < ' a > {
1670
+ #[ allow( clippy:: too_many_arguments) ]
1670
1671
pub fn new (
1671
1672
protocol_version : u8 ,
1672
1673
server_version : impl Into < Cow < ' a , [ u8 ] > > ,
@@ -1898,6 +1899,12 @@ impl<'a> ComChangeUser<'a> {
1898
1899
}
1899
1900
}
1900
1901
1902
+ impl Default for ComChangeUser < ' _ > {
1903
+ fn default ( ) -> Self {
1904
+ Self :: new ( )
1905
+ }
1906
+ }
1907
+
1901
1908
impl < ' de > MyDeserialize < ' de > for ComChangeUser < ' de > {
1902
1909
const SIZE : Option < usize > = None ;
1903
1910
@@ -2042,7 +2049,7 @@ impl<'de> MyDeserialize<'de> for ComChangeUserMoreData<'de> {
2042
2049
}
2043
2050
}
2044
2051
2045
- impl < ' a > MySerialize for ComChangeUserMoreData < ' a > {
2052
+ impl MySerialize for ComChangeUserMoreData < ' _ > {
2046
2053
fn serialize ( & self , buf : & mut Vec < u8 > ) {
2047
2054
self . character_set . serialize ( & mut * buf) ;
2048
2055
if let Some ( ref auth_plugin) = self . auth_plugin {
@@ -2075,6 +2082,7 @@ pub struct HandshakeResponse<'a> {
2075
2082
}
2076
2083
2077
2084
impl < ' a > HandshakeResponse < ' a > {
2085
+ #[ allow( clippy:: too_many_arguments) ]
2078
2086
pub fn new (
2079
2087
scramble_buf : Option < impl Into < Cow < ' a , [ u8 ] > > > ,
2080
2088
server_version : ( u16 , u16 , u16 ) ,
@@ -2789,7 +2797,7 @@ impl<'a> ComRegisterSlave<'a> {
2789
2797
}
2790
2798
2791
2799
/// Returns the raw `hostname` field value.
2792
- pub fn hostname_raw ( & ' a self ) -> & [ u8 ] {
2800
+ pub fn hostname_raw ( & self ) -> & [ u8 ] {
2793
2801
self . hostname . as_bytes ( )
2794
2802
}
2795
2803
@@ -2799,7 +2807,7 @@ impl<'a> ComRegisterSlave<'a> {
2799
2807
}
2800
2808
2801
2809
/// Returns the raw `user` field value.
2802
- pub fn user_raw ( & ' a self ) -> & [ u8 ] {
2810
+ pub fn user_raw ( & self ) -> & [ u8 ] {
2803
2811
self . user . as_bytes ( )
2804
2812
}
2805
2813
@@ -2809,7 +2817,7 @@ impl<'a> ComRegisterSlave<'a> {
2809
2817
}
2810
2818
2811
2819
/// Returns the raw `password` field value.
2812
- pub fn password_raw ( & ' a self ) -> & [ u8 ] {
2820
+ pub fn password_raw ( & self ) -> & [ u8 ] {
2813
2821
self . password . as_bytes ( )
2814
2822
}
2815
2823
@@ -3140,7 +3148,7 @@ pub struct Sid<'a> {
3140
3148
intervals : Seq < ' a , GnoInterval , LeU64 > ,
3141
3149
}
3142
3150
3143
- impl < ' a > Sid < ' a > {
3151
+ impl Sid < ' _ > {
3144
3152
/// Creates a new instance.
3145
3153
pub fn new ( uuid : [ u8 ; UUID_LEN ] ) -> Self {
3146
3154
Self {
@@ -3217,7 +3225,7 @@ impl Sid<'_> {
3217
3225
}
3218
3226
}
3219
3227
3220
- impl < ' a > FromStr for Sid < ' a > {
3228
+ impl FromStr for Sid < ' _ > {
3221
3229
type Err = io:: Error ;
3222
3230
3223
3231
fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
0 commit comments