Skip to content

Commit 165b979

Browse files
committed
Refactor
1 parent 06c92bb commit 165b979

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎parser/python.lalrpop‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ TryStatement: ast::Stmt = {
439439
.last()
440440
.map(|last| last.end_location)
441441
.or_else(|| orelse.last().map(|last| last.end_location))
442-
.unwrap_or_else(|| handlers.last().unwrap().end_location);
442+
.or_else(|| handlers.last().map(|last| last.end_location))
443+
.unwrap();
443444
ast::Stmt {
444445
custom: (),
445446
location,

0 commit comments

Comments
 (0)