diff options
author | Jonas Schievink <[email protected]> | 2021-04-04 00:46:45 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-04-04 00:46:45 +0100 |
commit | 3abcdc03ba335fb3487c62547f61746e4a199fe6 (patch) | |
tree | 8386a83d383563308a83f4491d313be043dc94d3 /crates/mbe/src/benchmark.rs | |
parent | bcf600fc881026ab018d0a8ae09eff7e54af538b (diff) |
Make `ast_to_token_tree` infallible
It could never return `None`, so reflect that in the return type
Diffstat (limited to 'crates/mbe/src/benchmark.rs')
-rw-r--r-- | crates/mbe/src/benchmark.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/mbe/src/benchmark.rs b/crates/mbe/src/benchmark.rs index ba814a2e1..38707ffa5 100644 --- a/crates/mbe/src/benchmark.rs +++ b/crates/mbe/src/benchmark.rs | |||
@@ -65,7 +65,7 @@ fn macro_rules_fixtures_tt() -> FxHashMap<String, tt::Subtree> { | |||
65 | .filter_map(ast::MacroRules::cast) | 65 | .filter_map(ast::MacroRules::cast) |
66 | .map(|rule| { | 66 | .map(|rule| { |
67 | let id = rule.name().unwrap().to_string(); | 67 | let id = rule.name().unwrap().to_string(); |
68 | let (def_tt, _) = ast_to_token_tree(&rule.token_tree().unwrap()).unwrap(); | 68 | let (def_tt, _) = ast_to_token_tree(&rule.token_tree().unwrap()); |
69 | (id, def_tt) | 69 | (id, def_tt) |
70 | }) | 70 | }) |
71 | .collect() | 71 | .collect() |