From 3a6e472975ee1dce078c9b87ddc0b681db3c836d Mon Sep 17 00:00:00 2001 From: itsjunetime Date: Wed, 1 Oct 2025 22:41:01 -0500 Subject: [PATCH 1/2] Fix two small things clippy was complaining about --- crates/ide-completion/src/completions/attribute/cfg.rs | 2 +- crates/ide-db/src/assists.rs | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/crates/ide-completion/src/completions/attribute/cfg.rs b/crates/ide-completion/src/completions/attribute/cfg.rs index b2e8efde8beb..b6739c9f75a2 100644 --- a/crates/ide-completion/src/completions/attribute/cfg.rs +++ b/crates/ide-completion/src/completions/attribute/cfg.rs @@ -39,7 +39,7 @@ pub(crate) fn complete_cfg(acc: &mut Completions, ctx: &CompletionContext<'_>) { "target_os" => KNOWN_OS.iter().copied().for_each(add_completion), "target_vendor" => KNOWN_VENDOR.iter().copied().for_each(add_completion), "target_endian" => ["little", "big"].into_iter().for_each(add_completion), - name => ctx.krate.potential_cfg(ctx.db).get_cfg_values(name).cloned().for_each(|s| { + name => ctx.krate.potential_cfg(ctx.db).get_cfg_values(name).for_each(|s| { let s = s.as_str(); let insert_text = format!(r#""{s}""#); let mut item = CompletionItem::new( diff --git a/crates/ide-db/src/assists.rs b/crates/ide-db/src/assists.rs index 384eb57c0fd5..12406efc39ce 100644 --- a/crates/ide-db/src/assists.rs +++ b/crates/ide-db/src/assists.rs @@ -170,14 +170,10 @@ impl AssistResolveStrategy { #[derive(Clone, Debug)] pub struct GroupLabel(pub String); -#[derive(Clone, Debug, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq, Default)] pub enum ExprFillDefaultMode { + #[default] Todo, Default, Underscore, } -impl Default for ExprFillDefaultMode { - fn default() -> Self { - Self::Todo - } -} From 8e350c5f27278b39e812d90872e294c666981fb6 Mon Sep 17 00:00:00 2001 From: itsjunetime Date: Wed, 1 Oct 2025 23:00:16 -0500 Subject: [PATCH 2/2] Get rid of unfulfilled expectation --- crates/stdx/src/thread.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/stdx/src/thread.rs b/crates/stdx/src/thread.rs index a34e9e4a6551..37b7a9f5edfa 100644 --- a/crates/stdx/src/thread.rs +++ b/crates/stdx/src/thread.rs @@ -101,7 +101,6 @@ impl Drop for JoinHandle { } } -#[expect(clippy::min_ident_chars, reason = "trait impl")] impl fmt::Debug for JoinHandle { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.pad("JoinHandle { .. }")