fix potentially confusing lifetime

This commit is contained in:
Robin Appelman 2025-10-10 23:23:33 +02:00
commit c9aea2fc74

View file

@ -76,7 +76,7 @@ enum EscapeState {
Escaped, Escaped,
} }
fn maybe_quoted(x: &str) -> Cow<str> { fn maybe_quoted<'a>(x: &'a str) -> Cow<'a, str> {
let mut i = x.chars(); let mut i = x.chars();
if i.next() == Some('"') { if i.next() == Some('"') {
let mut s = String::with_capacity(x.len()); let mut s = String::with_capacity(x.len());