File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ trait ProtobufOptions {
41
41
impl < ' a > ProtobufOptions for & ' a [ model:: ProtobufOption ] {
42
42
fn by_name ( & self , name : & str ) -> Option < & model:: ProtobufConstant > {
43
43
let option_name = name;
44
- for & model:: ProtobufOption {
45
- ref name,
46
- ref value,
44
+ for model:: ProtobufOption {
45
+ name,
46
+ value,
47
47
} in * self
48
48
{
49
49
if name == option_name {
@@ -224,7 +224,7 @@ impl AbsolutePath {
224
224
} else {
225
225
assert ! ( !path. starts_with( '.' ) ) ;
226
226
assert ! ( !path. ends_with( '.' ) ) ;
227
- AbsolutePath :: new ( format ! ( ".{}" , path ) )
227
+ AbsolutePath :: new ( format ! ( ".{path}" ) )
228
228
}
229
229
}
230
230
@@ -396,7 +396,7 @@ struct Resolver<'a> {
396
396
397
397
impl < ' a > Resolver < ' a > {
398
398
fn map_entry_name_for_field_name ( field_name : & str ) -> String {
399
- format ! ( "{}_MapEntry" , field_name )
399
+ format ! ( "{field_name }_MapEntry" )
400
400
}
401
401
402
402
fn map_entry_field (
@@ -964,7 +964,7 @@ impl<'a> Resolver<'a> {
964
964
v. map_err ( |( ) | {
965
965
ConvertError :: UnsupportedExtensionType (
966
966
option_name. to_owned ( ) ,
967
- format ! ( "{:?}" , field_type ) ,
967
+ format ! ( "{field_type :?}" ) ,
968
968
)
969
969
} )
970
970
}
Original file line number Diff line number Diff line change @@ -912,7 +912,7 @@ impl<'a> Parser<'a> {
912
912
913
913
fn next_ident_if_in ( & mut self , idents : & [ & str ] ) -> ParserResult < Option < String > > {
914
914
let v = match self . lookahead ( ) ? {
915
- Some ( & Token :: Ident ( ref next) ) => {
915
+ Some ( Token :: Ident ( next) ) => {
916
916
if idents. iter ( ) . any ( |i| i == next) {
917
917
next. clone ( )
918
918
} else {
You can’t perform that action at this time.
0 commit comments