diff options
author | Jean SIMARD <[email protected]> | 2020-09-23 07:45:35 +0100 |
---|---|---|
committer | Jean SIMARD <[email protected]> | 2020-09-24 15:39:08 +0100 |
commit | 875ad9b5c410200f5072515ae91b4ff51cff0448 (patch) | |
tree | 6bda8f0ada24dc61116e8f427a10109524bd7645 /crates/mbe/src | |
parent | 5d137f21f298c079b761bdae8284e1cd88fafb88 (diff) |
Bump smol_str from 0.1.16 to 0.1.17
Diffstat (limited to 'crates/mbe/src')
-rw-r--r-- | crates/mbe/src/syntax_bridge.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/mbe/src/syntax_bridge.rs b/crates/mbe/src/syntax_bridge.rs index a8ad917fb..d987b2500 100644 --- a/crates/mbe/src/syntax_bridge.rs +++ b/crates/mbe/src/syntax_bridge.rs | |||
@@ -636,7 +636,10 @@ impl<'a> TreeSink for TtTreeSink<'a> { | |||
636 | let (text, id) = match leaf { | 636 | let (text, id) = match leaf { |
637 | tt::Leaf::Ident(ident) => (ident.text.clone(), ident.id), | 637 | tt::Leaf::Ident(ident) => (ident.text.clone(), ident.id), |
638 | tt::Leaf::Punct(punct) => { | 638 | tt::Leaf::Punct(punct) => { |
639 | (SmolStr::new_inline_from_ascii(1, &[punct.char as u8]), punct.id) | 639 | assert!(punct.char.is_ascii()); |
640 | let char = &(punct.char as u8); | ||
641 | let text = std::str::from_utf8(std::slice::from_ref(char)).unwrap(); | ||
642 | (SmolStr::new_inline(text), punct.id) | ||
640 | } | 643 | } |
641 | tt::Leaf::Literal(lit) => (lit.text.clone(), lit.id), | 644 | tt::Leaf::Literal(lit) => (lit.text.clone(), lit.id), |
642 | }; | 645 | }; |