From 875ad9b5c410200f5072515ae91b4ff51cff0448 Mon Sep 17 00:00:00 2001 From: Jean SIMARD Date: Wed, 23 Sep 2020 08:45:35 +0200 Subject: Bump smol_str from 0.1.16 to 0.1.17 --- crates/mbe/src/syntax_bridge.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/mbe/src/syntax_bridge.rs') 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> { let (text, id) = match leaf { tt::Leaf::Ident(ident) => (ident.text.clone(), ident.id), tt::Leaf::Punct(punct) => { - (SmolStr::new_inline_from_ascii(1, &[punct.char as u8]), punct.id) + assert!(punct.char.is_ascii()); + let char = &(punct.char as u8); + let text = std::str::from_utf8(std::slice::from_ref(char)).unwrap(); + (SmolStr::new_inline(text), punct.id) } tt::Leaf::Literal(lit) => (lit.text.clone(), lit.id), }; -- cgit v1.2.3