Use direct matching in mixed quoted text hook

This commit is contained in:
2026-09-24 18:57:41 -07:00
parent 6b0ef99eca
commit 97a8703adc
2 changed files with 10 additions and 7 deletions
+4 -7
View File
@@ -1221,14 +1221,11 @@ impl Parser<'_> {
return Err(self.error("Expected a double-quoted string."));
}
#[cfg(test)]
if self.mixed.is_some() {
let span = self.current().span;
let span = self.current().span;
#[cfg(test)]
if let Some(mixed) = &mut self.mixed {
let raw = &self.source[span.start..span.end];
let value = self
.mixed
.as_mut()
.expect("mixed quoted consumer")
.quoted_text(raw, span)?;
let value = mixed.quoted_text(raw, span)?;
self.cursor += 1;
return Ok(value);
}