From 8d9961b75377a7bd2656b5aa1451710de8c86f60 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 28 Jul 2018 13:07:10 +0300 Subject: Migrate to text-unit --- src/lexer/ptr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lexer') diff --git a/src/lexer/ptr.rs b/src/lexer/ptr.rs index 99d55b283..d1391fd5f 100644 --- a/src/lexer/ptr.rs +++ b/src/lexer/ptr.rs @@ -11,7 +11,7 @@ impl<'s> Ptr<'s> { pub fn new(text: &'s str) -> Ptr<'s> { Ptr { text, - len: TextUnit::new(0), + len: 0.into(), } } @@ -47,7 +47,7 @@ impl<'s> Ptr<'s> { pub fn bump(&mut self) -> Option { let ch = self.chars().next()?; - self.len += TextUnit::len_of_char(ch); + self.len += TextUnit::of_char(ch); Some(ch) } -- cgit v1.2.3