@@ -336,7 +336,7 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
336
336
walk_list ! ( visitor, visit_lifetime_def, & function_declaration. lifetimes) ;
337
337
}
338
338
TyPath ( ref maybe_qself, ref path) => {
339
- for qself in maybe_qself {
339
+ if let Some ( ref qself) = * maybe_qself {
340
340
visitor. visit_ty ( & qself. ty ) ;
341
341
}
342
342
visitor. visit_path ( path, typ. id ) ;
@@ -408,7 +408,7 @@ pub fn walk_pat<'v, V: Visitor<'v>>(visitor: &mut V, pattern: &'v Pat) {
408
408
match pattern. node {
409
409
PatEnum ( ref path, ref opt_children) => {
410
410
visitor. visit_path ( path, pattern. id ) ;
411
- for children in opt_children {
411
+ if let Some ( ref children) = * opt_children {
412
412
walk_list ! ( visitor, visit_pat, children) ;
413
413
}
414
414
}
@@ -723,7 +723,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
723
723
walk_list ! ( visitor, visit_expr, end) ;
724
724
}
725
725
ExprPath ( ref maybe_qself, ref path) => {
726
- for qself in maybe_qself {
726
+ if let Some ( ref qself) = * maybe_qself {
727
727
visitor. visit_ty ( & qself. ty ) ;
728
728
}
729
729
visitor. visit_path ( path, expression. id )
0 commit comments