File tree 5 files changed +5
-5
lines changed 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ impl Attr {
235
235
let ( path, input) = tt. split_at ( path_end) ;
236
236
let path = Interned :: new ( ModPath :: from_tt ( db, path) ?) ;
237
237
238
- let input = match input. get ( 0 ) {
238
+ let input = match input. first ( ) {
239
239
Some ( tt:: TokenTree :: Subtree ( tree) ) => {
240
240
Some ( Interned :: new ( AttrInput :: TokenTree ( Box :: new ( tree. clone ( ) ) ) ) )
241
241
}
Original file line number Diff line number Diff line change @@ -232,7 +232,7 @@ fn convert_path(
232
232
ast:: PathSegmentKind :: SuperKw => {
233
233
let mut deg = 1 ;
234
234
let mut next_segment = None ;
235
- while let Some ( segment) = segments. next ( ) {
235
+ for segment in segments. by_ref ( ) {
236
236
match segment. kind ( ) ? {
237
237
ast:: PathSegmentKind :: SuperKw => deg += 1 ,
238
238
ast:: PathSegmentKind :: Name ( name) => {
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ impl<'p> MatchCheckCtx<'p> {
237
237
ctor = Or ;
238
238
// Collect here because `Arena::alloc_extend` panics on reentrancy.
239
239
let subpats: SmallVec < [ _ ; 2 ] > =
240
- pats. into_iter ( ) . map ( |pat| self . lower_pat ( pat) ) . collect ( ) ;
240
+ pats. iter ( ) . map ( |pat| self . lower_pat ( pat) ) . collect ( ) ;
241
241
fields = self . pattern_arena . alloc_extend ( subpats) ;
242
242
}
243
243
}
Original file line number Diff line number Diff line change @@ -1715,7 +1715,7 @@ impl Evaluator<'_> {
1715
1715
let v: Cow < ' _ , [ u8 ] > = if size != v. len ( ) {
1716
1716
// Handle self enum
1717
1717
if size == 16 && v. len ( ) < 16 {
1718
- Cow :: Owned ( pad16 ( & v, false ) . to_vec ( ) )
1718
+ Cow :: Owned ( pad16 ( v, false ) . to_vec ( ) )
1719
1719
} else if size < 16 && v. len ( ) == 16 {
1720
1720
Cow :: Borrowed ( & v[ 0 ..size] )
1721
1721
} else {
Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ fn modpath_from_str(link: &str) -> Option<ModPath> {
311
311
"self" => PathKind :: Super ( 0 ) ,
312
312
"super" => {
313
313
let mut deg = 1 ;
314
- while let Some ( segment) = parts. next ( ) {
314
+ for segment in parts. by_ref ( ) {
315
315
if segment == "super" {
316
316
deg += 1 ;
317
317
} else {
You can’t perform that action at this time.
0 commit comments