@@ -178,13 +178,13 @@ impl Make<Ident> for &str {
178
178
179
179
impl Make < Ident > for String {
180
180
fn make ( self , mk : & Builder ) -> Ident {
181
- Ident :: new ( & * self , mk. span )
181
+ Ident :: new ( & self , mk. span )
182
182
}
183
183
}
184
184
185
185
impl Make < Ident > for & String {
186
186
fn make ( self , mk : & Builder ) -> Ident {
187
- Ident :: new ( & * self , mk. span )
187
+ Ident :: new ( self , mk. span )
188
188
}
189
189
}
190
190
@@ -209,7 +209,8 @@ impl<'a> Make<Path> for &'a str {
209
209
210
210
impl < ' a > Make < Visibility > for & ' a str {
211
211
fn make ( self , mk_ : & Builder ) -> Visibility {
212
- let kind = match self {
212
+
213
+ match self {
213
214
"pub" => Visibility :: Public ( VisPublic {
214
215
pub_token : token:: Pub ( mk_. span ) ,
215
216
} ) ,
@@ -230,8 +231,7 @@ impl<'a> Make<Visibility> for &'a str {
230
231
path : Box :: new ( mk ( ) . path ( "super" ) ) ,
231
232
} ) ,
232
233
_ => panic ! ( "unrecognized string for Visibility: {:?}" , self ) ,
233
- } ;
234
- kind
234
+ }
235
235
}
236
236
}
237
237
@@ -379,13 +379,13 @@ impl Make<NestedMeta> for Lit {
379
379
380
380
impl Make < Lit > for String {
381
381
fn make ( self , mk : & Builder ) -> Lit {
382
- Lit :: Str ( LitStr :: new ( & * self , mk. span ) )
382
+ Lit :: Str ( LitStr :: new ( & self , mk. span ) )
383
383
}
384
384
}
385
385
386
386
impl Make < Lit > for & String {
387
387
fn make ( self , mk : & Builder ) -> Lit {
388
- Lit :: Str ( LitStr :: new ( & * self , mk. span ) )
388
+ Lit :: Str ( LitStr :: new ( self , mk. span ) )
389
389
}
390
390
}
391
391
@@ -884,7 +884,7 @@ impl Builder {
884
884
let rhs = rhs. make ( & self ) ;
885
885
886
886
match op {
887
- BinOp :: Lt ( _) | BinOp :: Shl ( _) if has_rightmost_cast ( & * lhs) => lhs = mk ( ) . paren_expr ( lhs) ,
887
+ BinOp :: Lt ( _) | BinOp :: Shl ( _) if has_rightmost_cast ( & lhs) => lhs = mk ( ) . paren_expr ( lhs) ,
888
888
_ => { }
889
889
}
890
890
@@ -2596,13 +2596,13 @@ fn has_rightmost_cast(expr: &Expr) -> bool {
2596
2596
attrs : _,
2597
2597
op : _,
2598
2598
ref expr,
2599
- } ) => has_rightmost_cast ( & * * expr) ,
2599
+ } ) => has_rightmost_cast ( expr) ,
2600
2600
Expr :: Binary ( ExprBinary {
2601
2601
attrs : _,
2602
2602
left : _,
2603
2603
op : _,
2604
2604
ref right,
2605
- } ) => has_rightmost_cast ( & * * right) ,
2605
+ } ) => has_rightmost_cast ( right) ,
2606
2606
_ => false ,
2607
2607
}
2608
2608
}
0 commit comments