From 66101e931c641b7d96dcfdbb83838130eab588bc Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 22 Sep 2019 23:46:27 +0300 Subject: simplify --- crates/ra_mbe/src/subtree_source.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'crates/ra_mbe') diff --git a/crates/ra_mbe/src/subtree_source.rs b/crates/ra_mbe/src/subtree_source.rs index 9d6d0133f..cf7458905 100644 --- a/crates/ra_mbe/src/subtree_source.rs +++ b/crates/ra_mbe/src/subtree_source.rs @@ -148,15 +148,7 @@ fn convert_ident(ident: &tt::Ident) -> TtToken { } fn convert_punct(p: tt::Punct) -> TtToken { - let kind = match p.char { - // lexer may produce compound tokens for these ones - '.' => T![.], - ':' => T![:], - '=' => T![=], - '!' => T![!], - '-' => T![-], - c => SyntaxKind::from_char(c).unwrap(), - }; + let kind = SyntaxKind::from_char(p.char).unwrap(); let text = { let mut buf = [0u8; 4]; let s: &str = p.char.encode_utf8(&mut buf); -- cgit v1.2.3