@@ -299,21 +299,21 @@ fn calc_unused_spans(
299
299
300
300
let mut unused_spans = Vec :: new ( ) ;
301
301
let mut to_remove = Vec :: new ( ) ;
302
- let mut used_childs = 0 ;
302
+ let mut used_children = 0 ;
303
303
let mut contains_self = false ;
304
304
let mut previous_unused = false ;
305
305
for ( pos, ( use_tree, use_tree_id) ) in nested. iter ( ) . enumerate ( ) {
306
306
let remove = match calc_unused_spans ( unused_import, use_tree, * use_tree_id) {
307
307
UnusedSpanResult :: Used => {
308
- used_childs += 1 ;
308
+ used_children += 1 ;
309
309
None
310
310
}
311
311
UnusedSpanResult :: Unused { mut spans, remove } => {
312
312
unused_spans. append ( & mut spans) ;
313
313
Some ( remove)
314
314
}
315
315
UnusedSpanResult :: PartialUnused { mut spans, remove : mut to_remove_extra } => {
316
- used_childs += 1 ;
316
+ used_children += 1 ;
317
317
unused_spans. append ( & mut spans) ;
318
318
to_remove. append ( & mut to_remove_extra) ;
319
319
None
@@ -322,7 +322,7 @@ fn calc_unused_spans(
322
322
if let Some ( remove) = remove {
323
323
let remove_span = if nested. len ( ) == 1 {
324
324
remove
325
- } else if pos == nested. len ( ) - 1 || used_childs > 0 {
325
+ } else if pos == nested. len ( ) - 1 || used_children > 0 {
326
326
// Delete everything from the end of the last import, to delete the
327
327
// previous comma
328
328
nested[ pos - 1 ] . 0 . span . shrink_to_hi ( ) . to ( use_tree. span )
@@ -346,7 +346,7 @@ fn calc_unused_spans(
346
346
}
347
347
if unused_spans. is_empty ( ) {
348
348
UnusedSpanResult :: Used
349
- } else if used_childs == 0 {
349
+ } else if used_children == 0 {
350
350
UnusedSpanResult :: Unused { spans : unused_spans, remove : full_span }
351
351
} else {
352
352
// If there is only one remaining child that is used, the braces around the use
@@ -360,7 +360,7 @@ fn calc_unused_spans(
360
360
// `self`: `use foo::{self};` is valid Rust syntax, while `use foo::self;` errors
361
361
// out. We also cannot turn `use foo::{self}` into `use foo`, as the former doesn't
362
362
// import types with the same name as the module.
363
- if used_childs == 1 && !contains_self {
363
+ if used_children == 1 && !contains_self {
364
364
// Left brace, from the start of the nested group to the first item.
365
365
to_remove. push (
366
366
tree_span. shrink_to_lo ( ) . to ( nested. first ( ) . unwrap ( ) . 0 . span . shrink_to_lo ( ) ) ,
0 commit comments