diff options
Diffstat (limited to 'crates/libsyntax2/src/yellow')
-rw-r--r-- | crates/libsyntax2/src/yellow/green.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/yellow/green.rs b/crates/libsyntax2/src/yellow/green.rs index dc3186a24..8fb691643 100644 --- a/crates/libsyntax2/src/yellow/green.rs +++ b/crates/libsyntax2/src/yellow/green.rs | |||
@@ -31,7 +31,7 @@ impl GreenNode { | |||
31 | 31 | ||
32 | pub fn text_len(&self) -> TextUnit { | 32 | pub fn text_len(&self) -> TextUnit { |
33 | match self { | 33 | match self { |
34 | GreenNode::Leaf { text, .. } => TextUnit::of_str(text.as_str()), | 34 | GreenNode::Leaf { text, .. } => TextUnit::from(text.len() as u32), |
35 | GreenNode::Branch(b) => b.text_len(), | 35 | GreenNode::Branch(b) => b.text_len(), |
36 | } | 36 | } |
37 | } | 37 | } |