diff --git a/crates/ruff/src/directives.rs b/crates/ruff/src/directives.rs index 1ed7d20c3d..59b2a4c572 100644 --- a/crates/ruff/src/directives.rs +++ b/crates/ruff/src/directives.rs @@ -405,7 +405,7 @@ y = 2 z = x + 1"; assert_eq!( noqa_mappings(contents), - NoqaMapping::from_iter([TextRange::new(TextSize::from(0), TextSize::from(22)),]) + NoqaMapping::from_iter([TextRange::new(TextSize::from(0), TextSize::from(22))]) ); let contents = "x = 1 diff --git a/crates/ruff_python_formatter/src/expression/expr_bool_op.rs b/crates/ruff_python_formatter/src/expression/expr_bool_op.rs index 8c818ffdfc..ce8c9a1d00 100644 --- a/crates/ruff_python_formatter/src/expression/expr_bool_op.rs +++ b/crates/ruff_python_formatter/src/expression/expr_bool_op.rs @@ -61,7 +61,7 @@ impl FormatNodeRule for FormatExprBoolOp { )?; } - write!(f, [op.format(), space(),])?; + write!(f, [op.format(), space()])?; FormatValue { value }.fmt(f)?; } diff --git a/crates/ruff_python_formatter/src/verbatim.rs b/crates/ruff_python_formatter/src/verbatim.rs index 39fbac41b1..e6e4fa7fc5 100644 --- a/crates/ruff_python_formatter/src/verbatim.rs +++ b/crates/ruff_python_formatter/src/verbatim.rs @@ -943,7 +943,7 @@ pub(crate) fn write_suppressed_clause_header( [verbatim_text( header.range(f.context().source())?, ContainsNewlines::Detect - ),] + )] )?; let comments = f.context().comments();