Skip to content

Commit 3a6e472

Browse files
committed
Fix two small things clippy was complaining about
1 parent 3f6d9e2 commit 3a6e472

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
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-
}

0 commit comments

Comments
 (0)