mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-16 17:45:24 +00:00
Remove unreachable code
This commit is contained in:
parent
95f3fa5a21
commit
696fe66056
1 changed files with 5 additions and 12 deletions
|
@ -111,18 +111,11 @@ pub fn parse_strings(
|
|||
deduped.push(take_current(&mut current));
|
||||
}
|
||||
|
||||
Ok(if has_fstring {
|
||||
Expr::new(
|
||||
initial_start,
|
||||
last_end,
|
||||
ExprKind::JoinedStr { values: deduped },
|
||||
)
|
||||
} else {
|
||||
deduped
|
||||
.into_iter()
|
||||
.exactly_one()
|
||||
.expect("String must be concatenated to a single element.")
|
||||
})
|
||||
Ok(Expr::new(
|
||||
initial_start,
|
||||
last_end,
|
||||
ExprKind::JoinedStr { values: deduped },
|
||||
))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue