@@ -59,15 +59,15 @@ impl LateLintPass<'_> for FieldReassignWithDefault {
59
59
// Default::default() get reassigned
60
60
let mut first_assign = None ;
61
61
let mut assigned_fields = FxHashMap :: default ( ) ;
62
- for consequtive_statement in & block. stmts [ stmt_idx + 1 ..] {
62
+ for consecutive_statement in & block. stmts [ stmt_idx + 1 ..] {
63
63
// interrupt if the statement is a let binding (`Local`) that shadows the original
64
64
// binding
65
- if stmt_shadows_binding ( consequtive_statement , binding_name) {
65
+ if stmt_shadows_binding ( consecutive_statement , binding_name) {
66
66
break ;
67
67
}
68
- // find out if and which field was set by this `consequtive_statement `
68
+ // find out if and which field was set by this `consecutive_statement `
69
69
else if let Some ( ( field_ident, assign_rhs) ) =
70
- field_reassigned_by_stmt ( consequtive_statement , binding_name)
70
+ field_reassigned_by_stmt ( consecutive_statement , binding_name)
71
71
{
72
72
// extract and store the assigned value for help message
73
73
let value_snippet = snippet ( cx, assign_rhs. span , ".." ) ;
@@ -77,10 +77,10 @@ impl LateLintPass<'_> for FieldReassignWithDefault {
77
77
78
78
// also set first instance of error for help message
79
79
if first_assign. is_none ( ) {
80
- first_assign = Some ( consequtive_statement ) ;
80
+ first_assign = Some ( consecutive_statement ) ;
81
81
}
82
82
}
83
- // interrupt also if no field was assigned, since we only want to look at consequtive statements
83
+ // interrupt also if no field was assigned, since we only want to look at consecutive statements
84
84
else {
85
85
break ;
86
86
}
0 commit comments