FIX: Cargo clippy. Manual fixes
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
1981b0833a
commit
1017eef981
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user