Fix clippy::needless_borrow lint violations (#36444)
Release Notes: - N/A
This commit is contained in:
parent
eecf142f06
commit
9e0e233319
242 changed files with 801 additions and 821 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue