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

@ -106,7 +106,7 @@ impl LspAdapter for CssLspAdapter {
.should_install_npm_package(
Self::PACKAGE_NAME,
&server_path,
&container_dir,
container_dir,
VersionStrategy::Latest(version),
)
.await;

View file

@ -96,7 +96,7 @@ async fn stream_response_archive(
AssetKind::TarGz => extract_tar_gz(destination_path, url, response).await?,
AssetKind::Gz => extract_gz(destination_path, url, response).await?,
AssetKind::Zip => {
util::archive::extract_zip(&destination_path, response).await?;
util::archive::extract_zip(destination_path, response).await?;
}
};
Ok(())
@ -113,11 +113,11 @@ async fn stream_file_archive(
AssetKind::Gz => extract_gz(destination_path, url, file_archive).await?,
#[cfg(not(windows))]
AssetKind::Zip => {
util::archive::extract_seekable_zip(&destination_path, file_archive).await?;
util::archive::extract_seekable_zip(destination_path, file_archive).await?;
}
#[cfg(windows)]
AssetKind::Zip => {
util::archive::extract_zip(&destination_path, file_archive).await?;
util::archive::extract_zip(destination_path, file_archive).await?;
}
};
Ok(())

View file

@ -343,7 +343,7 @@ impl LspAdapter for JsonLspAdapter {
.should_install_npm_package(
Self::PACKAGE_NAME,
&server_path,
&container_dir,
container_dir,
VersionStrategy::Latest(version),
)
.await;

View file

@ -204,7 +204,7 @@ impl LspAdapter for PythonLspAdapter {
.should_install_npm_package(
Self::SERVER_NAME.as_ref(),
&server_path,
&container_dir,
container_dir,
VersionStrategy::Latest(version),
)
.await;

View file

@ -581,7 +581,7 @@ impl ContextProvider for RustContextProvider {
if let (Some(path), Some(stem)) = (&local_abs_path, task_variables.get(&VariableName::Stem))
{
let fragment = test_fragment(&variables, &path, stem);
let fragment = test_fragment(&variables, path, stem);
variables.insert(RUST_TEST_FRAGMENT_TASK_VARIABLE, fragment);
};
if let Some(test_name) =
@ -607,7 +607,7 @@ impl ContextProvider for RustContextProvider {
}
if let Some(path) = local_abs_path.as_ref()
&& let Some((target, manifest_path)) =
target_info_from_abs_path(&path, project_env.as_ref()).await
target_info_from_abs_path(path, project_env.as_ref()).await
{
if let Some(target) = target {
variables.extend(TaskVariables::from_iter([
@ -1570,7 +1570,7 @@ mod tests {
let found = test_fragment(
&TaskVariables::from_iter(variables.into_iter().map(|(k, v)| (k, v.to_owned()))),
path,
&path.file_stem().unwrap().to_str().unwrap(),
path.file_stem().unwrap().to_str().unwrap(),
);
assert_eq!(expected, found);
}

View file

@ -111,7 +111,7 @@ impl LspAdapter for TailwindLspAdapter {
.should_install_npm_package(
Self::PACKAGE_NAME,
&server_path,
&container_dir,
container_dir,
VersionStrategy::Latest(version),
)
.await;

View file

@ -587,7 +587,7 @@ impl LspAdapter for TypeScriptLspAdapter {
.should_install_npm_package(
Self::PACKAGE_NAME,
&server_path,
&container_dir,
container_dir,
VersionStrategy::Latest(version.typescript_version.as_str()),
)
.await;

View file

@ -105,7 +105,7 @@ impl LspAdapter for YamlLspAdapter {
.should_install_npm_package(
Self::PACKAGE_NAME,
&server_path,
&container_dir,
container_dir,
VersionStrategy::Latest(version),
)
.await;