Skip to content

Commit a8a9863

Browse files
committed
remove a debug assertion that no longer passes
1 parent 0d02da1 commit a8a9863

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

crates/ruff_python_formatter/src/expression/expr_name.rs

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use ruff_formatter::{write, FormatContext};
1+
use ruff_formatter::write;
22
use ruff_python_ast::AnyNodeRef;
33
use ruff_python_ast::ExprName;
44

@@ -11,16 +11,11 @@ pub struct FormatExprName;
1111

1212
impl FormatNodeRule<ExprName> for FormatExprName {
1313
fn fmt_fields(&self, item: &ExprName, f: &mut PyFormatter) -> FormatResult<()> {
14-
let ExprName { id, range, ctx: _ } = item;
15-
16-
debug_assert_eq!(
17-
id.as_str(),
18-
f.context()
19-
.source_code()
20-
.slice(*range)
21-
.text(f.context().source_code())
22-
);
23-
14+
let ExprName {
15+
id: _,
16+
range,
17+
ctx: _,
18+
} = item;
2419
write!(f, [source_text_slice(*range)])
2520
}
2621

0 commit comments

Comments
 (0)