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
|
@ -1848,7 +1848,7 @@ impl Project {
|
|||
cx: &'a mut App,
|
||||
) -> Shared<Task<Option<HashMap<String, String>>>> {
|
||||
self.environment.update(cx, |environment, cx| {
|
||||
environment.get_buffer_environment(&buffer, &worktree_store, cx)
|
||||
environment.get_buffer_environment(buffer, worktree_store, cx)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -2592,7 +2592,7 @@ impl Project {
|
|||
cx: &mut App,
|
||||
) -> OpenLspBufferHandle {
|
||||
self.lsp_store.update(cx, |lsp_store, cx| {
|
||||
lsp_store.register_buffer_with_language_servers(&buffer, HashSet::default(), false, cx)
|
||||
lsp_store.register_buffer_with_language_servers(buffer, HashSet::default(), false, cx)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -4167,15 +4167,14 @@ impl Project {
|
|||
})
|
||||
.collect();
|
||||
|
||||
cx.spawn(async move |_, mut cx| {
|
||||
cx.spawn(async move |_, cx| {
|
||||
if let Some(buffer_worktree_id) = buffer_worktree_id {
|
||||
if let Some((worktree, _)) = worktrees_with_ids
|
||||
.iter()
|
||||
.find(|(_, id)| *id == buffer_worktree_id)
|
||||
{
|
||||
for candidate in candidates.iter() {
|
||||
if let Some(path) =
|
||||
Self::resolve_path_in_worktree(&worktree, candidate, &mut cx)
|
||||
if let Some(path) = Self::resolve_path_in_worktree(worktree, candidate, cx)
|
||||
{
|
||||
return Some(path);
|
||||
}
|
||||
|
@ -4187,9 +4186,7 @@ impl Project {
|
|||
continue;
|
||||
}
|
||||
for candidate in candidates.iter() {
|
||||
if let Some(path) =
|
||||
Self::resolve_path_in_worktree(&worktree, candidate, &mut cx)
|
||||
{
|
||||
if let Some(path) = Self::resolve_path_in_worktree(&worktree, candidate, cx) {
|
||||
return Some(path);
|
||||
}
|
||||
}
|
||||
|
@ -5329,7 +5326,7 @@ impl ResolvedPath {
|
|||
|
||||
pub fn project_path(&self) -> Option<&ProjectPath> {
|
||||
match self {
|
||||
Self::ProjectPath { project_path, .. } => Some(&project_path),
|
||||
Self::ProjectPath { project_path, .. } => Some(project_path),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
@ -5399,7 +5396,7 @@ impl Completion {
|
|||
_ => None,
|
||||
})
|
||||
.unwrap_or(DEFAULT_KIND_KEY);
|
||||
(kind_key, &self.label.filter_text())
|
||||
(kind_key, self.label.filter_text())
|
||||
}
|
||||
|
||||
/// Whether this completion is a snippet.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue