Merge pull request #20778 from itsjunetime/clippy_fixes

Fix small things clippy was complaining about
This commit is contained in:
Laurențiu Nicola 2025-10-02 04:10:00 +00:00 committed by GitHub
commit d9cdc03c05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 8 deletions

View file

@ -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_os" => KNOWN_OS.iter().copied().for_each(add_completion),
"target_vendor" => KNOWN_VENDOR.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), "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 s = s.as_str();
let insert_text = format!(r#""{s}""#); let insert_text = format!(r#""{s}""#);
let mut item = CompletionItem::new( let mut item = CompletionItem::new(

View file

@ -170,14 +170,10 @@ impl AssistResolveStrategy {
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct GroupLabel(pub String); pub struct GroupLabel(pub String);
#[derive(Clone, Debug, PartialEq, Eq)] #[derive(Clone, Debug, PartialEq, Eq, Default)]
pub enum ExprFillDefaultMode { pub enum ExprFillDefaultMode {
#[default]
Todo, Todo,
Default, Default,
Underscore, Underscore,
} }
impl Default for ExprFillDefaultMode {
fn default() -> Self {
Self::Todo
}
}

View file

@ -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> { impl<T> fmt::Debug for JoinHandle<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.pad("JoinHandle { .. }") f.pad("JoinHandle { .. }")