Inline `perform_rename_impl` as its only used in one spot (#23013)

Michael Sloan created

Also removes a redundant use of `to_point_utf16`.

Release Notes:

- N/A

Change summary

crates/project/src/project.rs | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)

Detailed changes

crates/project/src/project.rs 🔗

@@ -2934,14 +2934,14 @@ impl Project {
         self.prepare_rename_impl(buffer, position, cx)
     }
 
-    fn perform_rename_impl(
+    pub fn perform_rename<T: ToPointUtf16>(
         &mut self,
         buffer: Model<Buffer>,
-        position: PointUtf16,
+        position: T,
         new_name: String,
-        push_to_history: bool,
         cx: &mut ModelContext<Self>,
     ) -> Task<Result<ProjectTransaction>> {
+        let push_to_history = true;
         let position = position.to_point_utf16(buffer.read(cx));
         self.request_lsp(
             buffer,
@@ -2955,17 +2955,6 @@ impl Project {
         )
     }
 
-    pub fn perform_rename<T: ToPointUtf16>(
-        &mut self,
-        buffer: Model<Buffer>,
-        position: T,
-        new_name: String,
-        cx: &mut ModelContext<Self>,
-    ) -> Task<Result<ProjectTransaction>> {
-        let position = position.to_point_utf16(buffer.read(cx));
-        self.perform_rename_impl(buffer, position, new_name, true, cx)
-    }
-
     pub fn on_type_format<T: ToPointUtf16>(
         &mut self,
         buffer: Model<Buffer>,