aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/syntax_bridge.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe/src/syntax_bridge.rs')
-rw-r--r--crates/ra_mbe/src/syntax_bridge.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs
index b91b0e7a5..7560d215a 100644
--- a/crates/ra_mbe/src/syntax_bridge.rs
+++ b/crates/ra_mbe/src/syntax_bridge.rs
@@ -107,7 +107,7 @@ pub fn token_tree_to_ast_item_list(tt: &tt::Subtree) -> TreeArc<ast::SourceFile>
107impl TokenMap { 107impl TokenMap {
108 pub fn relative_range_of(&self, tt: tt::TokenId) -> Option<TextRange> { 108 pub fn relative_range_of(&self, tt: tt::TokenId) -> Option<TextRange> {
109 let idx = tt.0 as usize; 109 let idx = tt.0 as usize;
110 self.tokens.get(idx).map(|&it| it) 110 self.tokens.get(idx).copied()
111 } 111 }
112 112
113 fn alloc(&mut self, relative_range: TextRange) -> tt::TokenId { 113 fn alloc(&mut self, relative_range: TextRange) -> tt::TokenId {