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