diff options
author | Edwin Cheng <[email protected]> | 2019-05-27 17:54:32 +0100 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2019-05-27 17:54:32 +0100 |
commit | a3b9aecc9b51f4d02cdcfb00fd5d8b031eff8a56 (patch) | |
tree | 2bc9935831262b75e8a3bc2ede0e571b0ebd56cc /crates/ra_mbe | |
parent | 98aac6b751879305dd236c3f22c44755514c8162 (diff) |
Minor use module
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r-- | crates/ra_mbe/src/syntax_bridge.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index caeb842b1..c0a3fec35 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs | |||
@@ -3,8 +3,7 @@ use ra_syntax::{ | |||
3 | AstNode, SyntaxNode, TextRange, SyntaxKind, SmolStr, SyntaxTreeBuilder, TreeArc, SyntaxElement, | 3 | AstNode, SyntaxNode, TextRange, SyntaxKind, SmolStr, SyntaxTreeBuilder, TreeArc, SyntaxElement, |
4 | ast, SyntaxKind::*, TextUnit, T | 4 | ast, SyntaxKind::*, TextUnit, T |
5 | }; | 5 | }; |
6 | use tt::buffer::Cursor; | 6 | use tt::buffer::{TokenBuffer, Cursor}; |
7 | |||
8 | use crate::subtree_source::{SubtreeTokenSource}; | 7 | use crate::subtree_source::{SubtreeTokenSource}; |
9 | use crate::ExpandError; | 8 | use crate::ExpandError; |
10 | 9 | ||
@@ -50,7 +49,7 @@ fn token_tree_to_syntax_node<F>(tt: &tt::Subtree, f: F) -> Result<TreeArc<Syntax | |||
50 | where | 49 | where |
51 | F: Fn(&mut ra_parser::TokenSource, &mut ra_parser::TreeSink), | 50 | F: Fn(&mut ra_parser::TokenSource, &mut ra_parser::TreeSink), |
52 | { | 51 | { |
53 | let buffer = tt::buffer::TokenBuffer::new(&[tt.clone().into()]); | 52 | let buffer = TokenBuffer::new(&[tt.clone().into()]); |
54 | let mut token_source = SubtreeTokenSource::new(&buffer); | 53 | let mut token_source = SubtreeTokenSource::new(&buffer); |
55 | let mut tree_sink = TtTreeSink::new(buffer.begin()); | 54 | let mut tree_sink = TtTreeSink::new(buffer.begin()); |
56 | f(&mut token_source, &mut tree_sink); | 55 | f(&mut token_source, &mut tree_sink); |