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
|
@ -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;
|
||||
|
|
|
@ -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(())
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue