From ffca2c1fe439da9a810c92f80cf1b57a2f0611d1 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Tue, 26 Feb 2019 17:59:32 +0000 Subject: Fix a typo --- crates/ra_mbe/src/syntax_bridge.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_mbe/src/syntax_bridge.rs') diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index c1472bbe5..4b1d1d3ca 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs @@ -8,7 +8,7 @@ use ra_syntax::{ #[derive(Default)] pub struct TokenMap { /// Maps `tt::TokenId` to the *relative* source range. - toknes: Vec, + tokens: Vec, } /// Convert the syntax tree (what user has written) to a `TokenTree` (what macro @@ -32,12 +32,12 @@ pub fn token_tree_to_ast_item_list(tt: &tt::Subtree) -> TreeArc impl TokenMap { pub fn relative_range_of(&self, tt: tt::TokenId) -> Option { let idx = tt.0 as usize; - self.toknes.get(idx).map(|&it| it) + self.tokens.get(idx).map(|&it| it) } fn alloc(&mut self, relative_range: TextRange) -> tt::TokenId { - let id = self.toknes.len(); - self.toknes.push(relative_range); + let id = self.tokens.len(); + self.tokens.push(relative_range); tt::TokenId(id as u32) } } -- cgit v1.2.3