Fix clippy::needless_borrow lint violations (#36444)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz
2025-08-18 21:54:35 +00:00
committed by GitHub
parent eecf142f06
commit 9e0e233319
242 changed files with 801 additions and 821 deletions
@@ -317,8 +317,8 @@ impl BreakpointStore {
.iter()
.filter_map(|breakpoint| {
breakpoint.bp.bp.to_proto(
&path,
&breakpoint.position(),
path,
breakpoint.position(),
&breakpoint.session_state,
)
})
@@ -753,7 +753,7 @@ impl BreakpointStore {
.iter()
.map(|breakpoint| {
let position = snapshot
.summary_for_anchor::<PointUtf16>(&breakpoint.position())
.summary_for_anchor::<PointUtf16>(breakpoint.position())
.row;
let breakpoint = &breakpoint.bp;
SourceBreakpoint {
+2 -2
View File
@@ -215,7 +215,7 @@ impl DapStore {
dap_settings.and_then(|s| s.binary.as_ref().map(PathBuf::from));
let user_args = dap_settings.map(|s| s.args.clone());
let delegate = self.delegate(&worktree, console, cx);
let delegate = self.delegate(worktree, console, cx);
let cwd: Arc<Path> = worktree.read(cx).abs_path().as_ref().into();
cx.spawn(async move |this, cx| {
@@ -902,7 +902,7 @@ impl dap::adapters::DapDelegate for DapAdapterDelegate {
}
fn worktree_root_path(&self) -> &Path {
&self.worktree.abs_path()
self.worktree.abs_path()
}
fn http_client(&self) -> Arc<dyn HttpClient> {
self.http_client.clone()
@@ -187,12 +187,12 @@ impl DapLocator for CargoLocator {
.cloned();
}
let executable = {
if let Some(ref name) = test_name.as_ref().and_then(|name| {
if let Some(name) = test_name.as_ref().and_then(|name| {
name.strip_prefix('$')
.map(|name| build_config.env.get(name))
.unwrap_or(Some(name))
}) {
find_best_executable(&executables, &name).await
find_best_executable(&executables, name).await
} else {
None
}
+2 -2
View File
@@ -1630,7 +1630,7 @@ impl Session {
+ 'static,
cx: &mut Context<Self>,
) -> Task<Option<T::Response>> {
if !T::is_supported(&capabilities) {
if !T::is_supported(capabilities) {
log::warn!(
"Attempted to send a DAP request that isn't supported: {:?}",
request
@@ -1688,7 +1688,7 @@ impl Session {
self.requests
.entry((&*key.0 as &dyn Any).type_id())
.and_modify(|request_map| {
request_map.remove(&key);
request_map.remove(key);
});
}