From 52f7f2d77025517c34e1f6c74582553dec90948c Mon Sep 17 00:00:00 2001 From: Brooks Swinnerton Date: Sun, 28 Jan 2024 15:20:50 -0500 Subject: [PATCH] Update name of function to match other implementation --- crates/vim/src/normal/case.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/vim/src/normal/case.rs b/crates/vim/src/normal/case.rs index 049df4bb27..db33e48c34 100644 --- a/crates/vim/src/normal/case.rs +++ b/crates/vim/src/normal/case.rs @@ -8,7 +8,7 @@ use crate::{ }; pub fn change_case(_: &mut Workspace, _: &ChangeCase, cx: &mut ViewContext) { - transform_case(cx, |c| { + manipulate_text(cx, |c| { if c.is_lowercase() { c.to_uppercase().collect::>() } else { @@ -22,7 +22,7 @@ pub fn convert_to_upper_case( _: &ConvertToUpperCase, cx: &mut ViewContext, ) { - transform_case(cx, |c| c.to_uppercase().collect::>()) + manipulate_text(cx, |c| c.to_uppercase().collect::>()) } pub fn convert_to_lower_case( @@ -30,10 +30,10 @@ pub fn convert_to_lower_case( _: &ConvertToLowerCase, cx: &mut ViewContext, ) { - transform_case(cx, |c| c.to_lowercase().collect::>()) + manipulate_text(cx, |c| c.to_lowercase().collect::>()) } -fn transform_case(cx: &mut ViewContext, transform: F) +fn manipulate_text(cx: &mut ViewContext, transform: F) where F: Fn(char) -> Vec + Copy, {