Skip to content

Commit c14edbf

Browse files
Auto-format: cargo fmt --all
1 parent 43eb720 commit c14edbf

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

crates/vm/src/stdlib/ast/python.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,7 @@ pub(crate) mod _ast {
137137
let is_list_field = if field_name == "args" {
138138
class_name == "Call" || class_name == "arguments"
139139
} else if field_name == "body" || field_name == "orelse" {
140-
!matches!(
141-
class_name.as_str(),
142-
"Lambda" | "Expression" | "IfExp"
143-
)
140+
!matches!(class_name.as_str(), "Lambda" | "Expression" | "IfExp")
144141
} else {
145142
LIST_FIELDS.contains(&field_name)
146143
};

crates/vm/src/stdlib/builtins.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,13 @@ mod builtins {
154154

155155
// compile(ast_node, ..., PyCF_ONLY_AST) returns the AST after validation
156156
if is_ast_only {
157-
let (expected_type, expected_name) = ast::mode_type_and_name(
158-
&vm.ctx, mode_str,
159-
)
160-
.ok_or_else(|| {
161-
vm.new_value_error(
162-
"compile() mode must be 'exec', 'eval', 'single' or 'func_type'"
163-
.to_owned(),
164-
)
165-
})?;
157+
let (expected_type, expected_name) = ast::mode_type_and_name(&vm.ctx, mode_str)
158+
.ok_or_else(|| {
159+
vm.new_value_error(
160+
"compile() mode must be 'exec', 'eval', 'single' or 'func_type'"
161+
.to_owned(),
162+
)
163+
})?;
166164
if !args.source.fast_isinstance(&expected_type) {
167165
return Err(vm.new_type_error(format!(
168166
"expected {} node, got {}",

0 commit comments

Comments
 (0)