chore: Fix several style lints (#17488)

It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-06 11:58:39 +02:00 committed by GitHub
parent 93249fc82b
commit e6c1c51b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
361 changed files with 3530 additions and 3587 deletions

View file

@ -249,7 +249,7 @@ impl LspAdapter for RustLspAdapter {
static REGEX: LazyLock<Regex> = LazyLock::new(|| Regex::new("\\(…?\\)").unwrap());
let detail = detail.unwrap();
const FUNCTION_PREFIXES: [&'static str; 6] = [
const FUNCTION_PREFIXES: [&str; 6] = [
"async fn",
"async unsafe fn",
"const fn",
@ -421,8 +421,8 @@ impl ContextProvider for RustContextProvider {
.is_some();
if is_main_function {
if let Some((package_name, bin_name)) = local_abs_path
.and_then(|local_abs_path| package_name_and_bin_name_from_abs_path(local_abs_path))
if let Some((package_name, bin_name)) =
local_abs_path.and_then(package_name_and_bin_name_from_abs_path)
{
return Ok(TaskVariables::from_iter([
(RUST_PACKAGE_TASK_VARIABLE.clone(), package_name),
@ -449,7 +449,7 @@ impl ContextProvider for RustContextProvider {
file: Option<Arc<dyn language::File>>,
cx: &AppContext,
) -> Option<TaskTemplates> {
const DEFAULT_RUN_NAME_STR: &'static str = "RUST_DEFAULT_PACKAGE_RUN";
const DEFAULT_RUN_NAME_STR: &str = "RUST_DEFAULT_PACKAGE_RUN";
let package_to_run = all_language_settings(file.as_ref(), cx)
.language(Some("Rust"))
.tasks