Skip to content

Commit d9cdc03

Browse files
authored
Merge pull request #20778 from itsjunetime/clippy_fixes
Fix small things clippy was complaining about
2 parents 3706595 + 8e350c5 commit d9cdc03

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

crates/ide-completion/src/completions/attribute/cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub(crate) fn complete_cfg(acc: &mut Completions, ctx: &CompletionContext<'_>) {
3939
"target_os" => KNOWN_OS.iter().copied().for_each(add_completion),
4040
"target_vendor" => KNOWN_VENDOR.iter().copied().for_each(add_completion),
4141
"target_endian" => ["little", "big"].into_iter().for_each(add_completion),
42-
name => ctx.krate.potential_cfg(ctx.db).get_cfg_values(name).cloned().for_each(|s| {
42+
name => ctx.krate.potential_cfg(ctx.db).get_cfg_values(name).for_each(|s| {
4343
let s = s.as_str();
4444
let insert_text = format!(r#""{s}""#);
4545
let mut item = CompletionItem::new(

crates/ide-db/src/assists.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,10 @@ impl AssistResolveStrategy {
170170
#[derive(Clone, Debug)]
171171
pub struct GroupLabel(pub String);
172172

173-
#[derive(Clone, Debug, PartialEq, Eq)]
173+
#[derive(Clone, Debug, PartialEq, Eq, Default)]
174174
pub enum ExprFillDefaultMode {
175+
#[default]
175176
Todo,
176177
Default,
177178
Underscore,
178179
}
179-
impl Default for ExprFillDefaultMode {
180-
fn default() -> Self {
181-
Self::Todo
182-
}
183-
}

crates/stdx/src/thread.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ impl<T> Drop for JoinHandle<T> {
101101
}
102102
}
103103

104-
#[expect(clippy::min_ident_chars, reason = "trait impl")]
105104
impl<T> fmt::Debug for JoinHandle<T> {
106105
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
107106
f.pad("JoinHandle { .. }")

0 commit comments

Comments
 (0)