mirror of
https://github.com/helix-editor/helix.git
synced 2025-10-06 00:13:28 +02:00
perf: use next_back
on DoubleEndedIterator
This commit is contained in:
@@ -65,7 +65,7 @@ pub fn print(s: &str) -> (String, Selection) {
|
||||
let head_at_beg = iter.next_if_eq(&"|").is_some();
|
||||
let last_grapheme = |s: &str| {
|
||||
UnicodeSegmentation::graphemes(s, true)
|
||||
.last()
|
||||
.next_back()
|
||||
.map(String::from)
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user