mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Merge #8135
8135: more clippy::{perf, complexity, style} fixes r=Veykril a=matthiaskrgr Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
This commit is contained in:
commit
d51cf133f6
39 changed files with 132 additions and 170 deletions
|
@ -638,7 +638,7 @@ fn collect_attrs(
|
|||
owner: &dyn ast::AttrsOwner,
|
||||
) -> impl Iterator<Item = Either<ast::Attr, ast::Comment>> {
|
||||
let (inner_attrs, inner_docs) = inner_attributes(owner.syntax())
|
||||
.map_or((None, None), |(attrs, docs)| ((Some(attrs), Some(docs))));
|
||||
.map_or((None, None), |(attrs, docs)| (Some(attrs), Some(docs)));
|
||||
|
||||
let outer_attrs = owner.attrs().filter(|attr| attr.excl_token().is_none());
|
||||
let attrs = outer_attrs
|
||||
|
|
|
@ -472,7 +472,7 @@ impl Scope {
|
|||
}
|
||||
Scope::ExprScope(scope) => {
|
||||
if let Some((label, name)) = scope.expr_scopes.label(scope.scope_id) {
|
||||
f(name.clone(), ScopeDef::Label(label))
|
||||
f(name, ScopeDef::Label(label))
|
||||
}
|
||||
scope.expr_scopes.entries(scope.scope_id).iter().for_each(|e| {
|
||||
f(e.name().clone(), ScopeDef::Local(e.pat()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue