FIX: Cargo clippy. Manual fixes

This commit is contained in:
Nicolás Hatcher
2025-09-12 18:32:15 +02:00
committed by Nicolás Hatcher Andrés
parent 1981b0833a
commit 1017eef981

View File

@@ -78,7 +78,7 @@ impl Extend<(usize, Value)> for Process<'_> {
/// The resulting string is safe to use inside XML attribute values. /// The resulting string is safe to use inside XML attribute values.
/// ///
/// Does not perform allocations if the given string does not contain escapable characters. /// Does not perform allocations if the given string does not contain escapable characters.
pub fn escape_xml(s: &str) -> Cow<str> { pub fn escape_xml(s: &'_ str) -> Cow<'_, str> {
let mut p = Process::Borrowed(s); let mut p = Process::Borrowed(s);
p.extend(s.char_indices().map(|(ind, c)| (ind, escape_char(c)))); p.extend(s.char_indices().map(|(ind, c)| (ind, escape_char(c))));
p.into_result() p.into_result()