We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0723271 + 6a0f13e commit 2edd0d2Copy full SHA for 2edd0d2
compiler/parser/src/string.rs
@@ -81,16 +81,18 @@ pub fn parse_strings(
81
deduped.push(take_current(&mut current));
82
}
83
84
- let node = if has_fstring {
85
- ExprKind::JoinedStr { values: deduped }
+ Ok(if has_fstring {
+ Expr::new(
86
+ initial_start,
87
+ last_end,
88
+ ExprKind::JoinedStr { values: deduped },
89
+ )
90
} else {
91
deduped
92
.into_iter()
93
.exactly_one()
94
.expect("String must be concatenated to a single element.")
- .node
- };
- Ok(Expr::new(initial_start, last_end, node))
95
+ })
96
97
98
#[cfg(test)]
0 commit comments