diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-20 11:08:00 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-20 11:08:00 +0000 |
commit | b28c903b18d8bd9b2010d6e3466d4f903fa0ba67 (patch) | |
tree | c73e213a5a1a2b7a344d7f5860edfd9531dfb65d /crates/mbe/src | |
parent | 63f509f4924e7448b9131514bbdd7a4da5292cd1 (diff) | |
parent | 3429b32ad119756985e1a7bfa5e9e53042671f8b (diff) |
Merge #7355
7355: :arrow_up: rowan r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/mbe/src')
-rw-r--r-- | crates/mbe/src/syntax_bridge.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/mbe/src/syntax_bridge.rs b/crates/mbe/src/syntax_bridge.rs index 51002e7b8..0cdc175be 100644 --- a/crates/mbe/src/syntax_bridge.rs +++ b/crates/mbe/src/syntax_bridge.rs | |||
@@ -507,7 +507,7 @@ impl SrcToken for SynToken { | |||
507 | } | 507 | } |
508 | } | 508 | } |
509 | fn to_text(&self) -> SmolStr { | 509 | fn to_text(&self) -> SmolStr { |
510 | self.token().text().clone() | 510 | self.token().text().into() |
511 | } | 511 | } |
512 | } | 512 | } |
513 | 513 | ||
@@ -682,10 +682,8 @@ impl<'a> TreeSink for TtTreeSink<'a> { | |||
682 | self.text_pos += TextSize::of(text); | 682 | self.text_pos += TextSize::of(text); |
683 | } | 683 | } |
684 | 684 | ||
685 | let text = SmolStr::new(self.buf.as_str()); | 685 | self.inner.token(kind, self.buf.as_str()); |
686 | self.buf.clear(); | 686 | self.buf.clear(); |
687 | self.inner.token(kind, text); | ||
688 | |||
689 | // Add whitespace between adjoint puncts | 687 | // Add whitespace between adjoint puncts |
690 | let next = last.bump(); | 688 | let next = last.bump(); |
691 | if let ( | 689 | if let ( |