mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Use array IntoIter
This commit is contained in:
parent
56fbf5d7b2
commit
ca44b6892e
13 changed files with 33 additions and 32 deletions
|
@ -283,7 +283,7 @@ pub fn mirror(input: TokenStream) -> TokenStream {
|
|||
input
|
||||
}
|
||||
"#;
|
||||
let proc_macros = std::array::IntoIter::new([
|
||||
let proc_macros = [
|
||||
ProcMacro {
|
||||
name: "identity".into(),
|
||||
kind: crate::ProcMacroKind::Attr,
|
||||
|
@ -304,7 +304,8 @@ pub fn mirror(input: TokenStream) -> TokenStream {
|
|||
kind: crate::ProcMacroKind::FuncLike,
|
||||
expander: Arc::new(MirrorProcMacroExpander),
|
||||
},
|
||||
])
|
||||
]
|
||||
.into_iter()
|
||||
.filter(|pm| proc_macros.iter().any(|name| name == pm.name))
|
||||
.collect();
|
||||
(proc_macros, source.into())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue