mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
avoid extra allocation in replacement
This commit is contained in:
parent
98aa162608
commit
3940b0587d
1 changed files with 1 additions and 1 deletions
|
@ -423,7 +423,7 @@ pub struct ResourcesForJavascript {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn without_unicode_isolation(s: &str) -> String {
|
pub fn without_unicode_isolation(s: &str) -> String {
|
||||||
s.replace("\u{2068}", "").replace("\u{2069}", "")
|
s.replace(|c| c == '\u{2068}' || c == '\u{2069}', "")
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
Loading…
Reference in a new issue