diff --git a/helix-core/src/case_conversion.rs b/helix-core/src/case_conversion.rs index b7ba1d08d..01e5a70b7 100644 --- a/helix-core/src/case_conversion.rs +++ b/helix-core/src/case_conversion.rs @@ -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(