mirror of https://github.com/helix-editor/helix
refactor: remove unneeded loop, replace with map instead
parent
d7a3ffa2d8
commit
5420ef5f63
|
@ -7,9 +7,7 @@ pub fn simple_case_conversion(
|
|||
buf: &mut Tendril,
|
||||
transform_char: impl Fn(&char) -> char,
|
||||
) {
|
||||
for c in text {
|
||||
buf.push(transform_char(&c))
|
||||
}
|
||||
*buf = text.map(|ch| transform_char(&ch)).collect();
|
||||
}
|
||||
|
||||
pub fn smart_case_conversion(
|
||||
|
|
Loading…
Reference in New Issue