Skip to content

Commit 7a40d9c

Browse files
committed
Refactor
1 parent 337b0ea commit 7a40d9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/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)