From 46b4f89c920c314caf1a8af2abdb09732d100d67 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Jan 2021 01:56:11 +0300 Subject: . --- crates/mbe/src/syntax_bridge.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/mbe') diff --git a/crates/mbe/src/syntax_bridge.rs b/crates/mbe/src/syntax_bridge.rs index 51002e7b8..1e1123889 100644 --- a/crates/mbe/src/syntax_bridge.rs +++ b/crates/mbe/src/syntax_bridge.rs @@ -507,7 +507,7 @@ impl SrcToken for SynToken { } } fn to_text(&self) -> SmolStr { - self.token().text().clone() + self.token().text().into() } } -- cgit v1.2.3 From 3429b32ad119756985e1a7bfa5e9e53042671f8b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Jan 2021 14:04:53 +0300 Subject: :arrow_up: rowan It now stores text inline with tokens --- crates/mbe/src/syntax_bridge.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'crates/mbe') diff --git a/crates/mbe/src/syntax_bridge.rs b/crates/mbe/src/syntax_bridge.rs index 1e1123889..0cdc175be 100644 --- a/crates/mbe/src/syntax_bridge.rs +++ b/crates/mbe/src/syntax_bridge.rs @@ -682,10 +682,8 @@ impl<'a> TreeSink for TtTreeSink<'a> { self.text_pos += TextSize::of(text); } - let text = SmolStr::new(self.buf.as_str()); + self.inner.token(kind, self.buf.as_str()); self.buf.clear(); - self.inner.token(kind, text); - // Add whitespace between adjoint puncts let next = last.bump(); if let ( -- cgit v1.2.3