chore: Fix clippy::needless_borrow up to an editor
This commit is contained in:
parent
c3102feeeb
commit
6c82380232
29 changed files with 86 additions and 88 deletions
|
@ -2316,7 +2316,7 @@ impl MultiBufferSnapshot {
|
|||
&self,
|
||||
point: T,
|
||||
) -> Option<(&BufferSnapshot, usize)> {
|
||||
let offset = point.to_offset(&self);
|
||||
let offset = point.to_offset(self);
|
||||
let mut cursor = self.excerpts.cursor::<usize>();
|
||||
cursor.seek(&offset, Bias::Right, &());
|
||||
if cursor.item().is_none() {
|
||||
|
@ -3694,7 +3694,7 @@ impl ExcerptId {
|
|||
pub fn cmp(&self, other: &Self, snapshot: &MultiBufferSnapshot) -> cmp::Ordering {
|
||||
let a = snapshot.excerpt_locator_for_id(*self);
|
||||
let b = snapshot.excerpt_locator_for_id(*other);
|
||||
a.cmp(&b).then_with(|| self.0.cmp(&other.0))
|
||||
a.cmp(b).then_with(|| self.0.cmp(&other.0))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue