diff --git a/Cargo.toml b/Cargo.toml index 0ad5d75411ec3..f0db99020a02f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,6 +73,7 @@ doc_markdown = "allow" missing_const_for_fn = "allow" significant_drop_in_scrutinee = "warn" iter_on_single_items = "warn" +unused_peekable = "warn" # cargo cargo = { level = "warn", priority = -1 } multiple_crate_versions = "allow" diff --git a/crates/oxc_codegen/src/gen.rs b/crates/oxc_codegen/src/gen.rs index 901c13deec597..f5c82000fac53 100644 --- a/crates/oxc_codegen/src/gen.rs +++ b/crates/oxc_codegen/src/gen.rs @@ -73,7 +73,7 @@ impl Gen for Directive<'_> { // See https://github.com/babel/babel/blob/v7.26.2/packages/babel-generator/src/generators/base.ts#L64 let directive = self.directive.as_str(); - let mut chars = directive.chars().peekable(); + let mut chars = directive.chars(); let mut quote = p.quote; while let Some(c) = chars.next() { match c {