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,
|
buf: &mut Tendril,
|
||||||
transform_char: impl Fn(&char) -> char,
|
transform_char: impl Fn(&char) -> char,
|
||||||
) {
|
) {
|
||||||
for c in text {
|
*buf = text.map(|ch| transform_char(&ch)).collect();
|
||||||
buf.push(transform_char(&c))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn smart_case_conversion(
|
pub fn smart_case_conversion(
|
||||||
|
|
Loading…
Reference in New Issue