mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-12 07:35:16 +00:00
Apply let-else statements
This commit is contained in:
parent
54af02c20c
commit
e081f1041e
2 changed files with 3 additions and 9 deletions
|
@ -1412,9 +1412,7 @@ impl Compiler {
|
|||
) -> CompileResult<()> {
|
||||
let with_location = self.current_source_location;
|
||||
|
||||
let (item, items) = if let Some(parts) = items.split_first() {
|
||||
parts
|
||||
} else {
|
||||
let Some((item, items)) = items.split_first() else {
|
||||
return Err(self.error(CodegenErrorType::EmptyWithItems));
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue