Fix clippy::needless_borrow lint violations (#36444)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-18 23:54:35 +02:00 committed by GitHub
parent eecf142f06
commit 9e0e233319
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
242 changed files with 801 additions and 821 deletions

View file

@ -478,7 +478,7 @@ impl SemanticsProvider for BranchBufferSemanticsProvider {
}
fn supports_inlay_hints(&self, buffer: &Entity<Buffer>, cx: &mut App) -> bool {
if let Some(buffer) = self.to_base(&buffer, &[], cx) {
if let Some(buffer) = self.to_base(buffer, &[], cx) {
self.0.supports_inlay_hints(&buffer, cx)
} else {
false
@ -491,7 +491,7 @@ impl SemanticsProvider for BranchBufferSemanticsProvider {
position: text::Anchor,
cx: &mut App,
) -> Option<Task<anyhow::Result<Vec<project::DocumentHighlight>>>> {
let buffer = self.to_base(&buffer, &[position], cx)?;
let buffer = self.to_base(buffer, &[position], cx)?;
self.0.document_highlights(&buffer, position, cx)
}
@ -502,7 +502,7 @@ impl SemanticsProvider for BranchBufferSemanticsProvider {
kind: crate::GotoDefinitionKind,
cx: &mut App,
) -> Option<Task<anyhow::Result<Vec<project::LocationLink>>>> {
let buffer = self.to_base(&buffer, &[position], cx)?;
let buffer = self.to_base(buffer, &[position], cx)?;
self.0.definitions(&buffer, position, kind, cx)
}