Skip to content

Commit 3a6729e

Browse files
committed
Use match
1 parent ebeb090 commit 3a6729e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/parser/src/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn parse_strings(
1515
let initial_kind = (values[0].1 .1 == StringKind::U).then(|| "u".to_owned());
1616

1717
// Optimization: fast-track the common case of a single string.
18-
if values.len() == 1 && matches!(&values[0].1 .1, StringKind::Normal | StringKind::U) {
18+
if matches!(&*values, [(_, (_, StringKind::Normal | StringKind::U), _)]) {
1919
let value = values.into_iter().last().unwrap().1 .0;
2020
return Ok(Expr::new(
2121
initial_start,

0 commit comments

Comments
 (0)