Remove unused variable

This commit is contained in:
Nathan Sobo 2022-03-10 15:27:29 -07:00
parent 3968b37e26
commit 69ce021f32

View file

@ -4351,7 +4351,7 @@ impl Editor {
.buffer .buffer
.read(cx) .read(cx)
.text_anchor_for_position(selection.head(), cx)?; .text_anchor_for_position(selection.head(), cx)?;
let (tail_buffer, tail_buffer_position) = self let (tail_buffer, _) = self
.buffer .buffer
.read(cx) .read(cx)
.text_anchor_for_position(selection.tail(), cx)?; .text_anchor_for_position(selection.tail(), cx)?;
@ -4361,7 +4361,6 @@ impl Editor {
let snapshot = cursor_buffer.read(cx).snapshot(); let snapshot = cursor_buffer.read(cx).snapshot();
let cursor_buffer_offset = cursor_buffer_position.to_offset(&snapshot); let cursor_buffer_offset = cursor_buffer_position.to_offset(&snapshot);
let tail_buffer_offset = tail_buffer_position.to_offset(&snapshot);
let prepare_rename = project.update(cx, |project, cx| { let prepare_rename = project.update(cx, |project, cx| {
project.prepare_rename(cursor_buffer, cursor_buffer_offset, cx) project.prepare_rename(cursor_buffer, cursor_buffer_offset, cx)
}); });
@ -4371,8 +4370,6 @@ impl Editor {
let rename_buffer_range = rename_range.to_offset(&snapshot); let rename_buffer_range = rename_range.to_offset(&snapshot);
let cursor_offset_in_rename_range = let cursor_offset_in_rename_range =
cursor_buffer_offset.saturating_sub(rename_buffer_range.start); cursor_buffer_offset.saturating_sub(rename_buffer_range.start);
let tail_offset_in_rename_range =
tail_buffer_offset.saturating_sub(rename_buffer_range.start);
this.update(&mut cx, |this, cx| { this.update(&mut cx, |this, cx| {
this.take_rename(cx); this.take_rename(cx);