Simplify some iterator combinators
This commit is contained in:
parent
c7572670a1
commit
7690fe3bc6
12 changed files with 91 additions and 135 deletions
|
@ -16,14 +16,13 @@ fn test_symbols() {
|
|||
let m: &syn::ItemMacro = file
|
||||
.items
|
||||
.iter()
|
||||
.filter_map(|i| {
|
||||
.find_map(|i| {
|
||||
if let syn::Item::Macro(m) = i {
|
||||
if m.mac.path == symbols_path { Some(m) } else { None }
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.next()
|
||||
.expect("did not find `symbols!` macro invocation.");
|
||||
|
||||
let body_tokens = m.mac.tokens.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue