Inline perform_rename_impl
as its only used in one spot (#23013)
Also removes a redundant use of `to_point_utf16`. Release Notes: - N/A
This commit is contained in:
parent
65c38f22f9
commit
de2e197ad9
1 changed files with 3 additions and 14 deletions
|
@ -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>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue