From 696fe66056106e8e62c359b50146a11adb58cc11 Mon Sep 17 00:00:00 2001 From: harupy Date: Sun, 1 Jan 2023 17:43:25 +0900 Subject: [PATCH] Remove unreachable code --- parser/src/string.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/parser/src/string.rs b/parser/src/string.rs index 817d0e8..027d4a9 100644 --- a/parser/src/string.rs +++ b/parser/src/string.rs @@ -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)]