diff --git a/impl/src/ast.rs b/impl/src/ast.rs index c2d6fab..1c18a21 100644 --- a/impl/src/ast.rs +++ b/impl/src/ast.rs @@ -539,18 +539,15 @@ fn extract_cfg(attributes: Vec) -> (Vec, Vec) { } let mut cfgs = Vec::new(); - // let mut index: usize = usize::MAX; - let mut index = 0; + let mut index: usize = usize::MAX; let attributes = attributes .into_iter() .filter_map(|e| { - // index = index.wrapping_add(1); + index = index.wrapping_add(1); if to_remove.contains(&index) { - index += 1; cfgs.push(e); return None; } - index += 1; Some(e) }) .collect::>();