mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 02:06:57 +00:00
Merge pull request #20778 from itsjunetime/clippy_fixes
Fix small things clippy was complaining about
This commit is contained in:
commit
d9cdc03c05
3 changed files with 3 additions and 8 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 { .. }")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue