From e97ad954e1468b90722cf91996d7dfc069fedf78 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 1 Aug 2022 11:01:00 +0200 Subject: Refactor to pass more `&str`s, work on more bytes --- src/util/slice.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/util/slice.rs') diff --git a/src/util/slice.rs b/src/util/slice.rs index d899dac..13b664d 100644 --- a/src/util/slice.rs +++ b/src/util/slice.rs @@ -42,6 +42,11 @@ impl<'a> Position<'a> { enter_index -= 1; } } + + /// To do. + pub fn to_indices(&self) -> (usize, usize) { + (self.start.index, self.end.index) + } } /// Chars belonging to a range. -- cgit