Skip to content

Commit bc66f56

Browse files
committed
Re-use heap allocation when converting bytes expr to map key
1 parent 333d96e commit bc66f56

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

engine/src/scheme.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl<'i> Lex<'i> for FieldIndex {
8282
input,
8383
)),
8484
},
85-
RhsValue::Bytes(b) => match String::from_utf8(b.to_vec()) {
85+
RhsValue::Bytes(b) => match String::from_utf8(b.into()) {
8686
Ok(s) => Ok((FieldIndex::MapKey(s), rest)),
8787
Err(_) => Err((LexErrorKind::ExpectedLiteral("expected utf8 string"), input)),
8888
},

0 commit comments

Comments
 (0)