Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #20778 from itsjunetime/clippy_fixes
Fix small things clippy was complaining about
Laurențiu Nicola 7 months ago
parent 3706595 · parent 8e350c5 · commit d9cdc03
-rw-r--r--crates/ide-completion/src/completions/attribute/cfg.rs2
-rw-r--r--crates/ide-db/src/assists.rs8
-rw-r--r--crates/stdx/src/thread.rs1
3 files changed, 3 insertions, 8 deletions
diff --git a/crates/ide-completion/src/completions/attribute/cfg.rs b/crates/ide-completion/src/completions/attribute/cfg.rs
index b2e8efde8b..b6739c9f75 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 384eb57c0f..12406efc39 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
- }
-}
diff --git a/crates/stdx/src/thread.rs b/crates/stdx/src/thread.rs
index a34e9e4a65..37b7a9f5ed 100644
--- a/crates/stdx/src/thread.rs
+++ b/crates/stdx/src/thread.rs
@@ -101,7 +101,6 @@ impl<T> Drop for JoinHandle<T> {
}
}
-#[expect(clippy::min_ident_chars, reason = "trait impl")]
impl<T> fmt::Debug for JoinHandle<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.pad("JoinHandle { .. }")