From 606e01c89bb3560babec634219a0a5196eaa4f21 Mon Sep 17 00:00:00 2001 From: Elie ROUDNINSKI Date: Mon, 9 Feb 2026 09:56:44 +0100 Subject: [PATCH] Re-use heap allocation when converting bytes expr to map key --- engine/src/scheme.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/scheme.rs b/engine/src/scheme.rs index c23066ad..57031911 100644 --- a/engine/src/scheme.rs +++ b/engine/src/scheme.rs @@ -82,7 +82,7 @@ impl<'i> Lex<'i> for FieldIndex { input, )), }, - RhsValue::Bytes(b) => match String::from_utf8(b.to_vec()) { + RhsValue::Bytes(b) => match String::from_utf8(b.into()) { Ok(s) => Ok((FieldIndex::MapKey(s), rest)), Err(_) => Err((LexErrorKind::ExpectedLiteral("expected utf8 string"), input)), },