diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-01 11:01:00 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-01 11:01:00 +0200 |
commit | e97ad954e1468b90722cf91996d7dfc069fedf78 (patch) | |
tree | e4a03d0e2a510738fe6cb46b4678d59d485c7a4b /src/util | |
parent | 65f51b446cfe1fe4da9143bfe5d71ad56e051dd6 (diff) | |
download | markdown-rs-e97ad954e1468b90722cf91996d7dfc069fedf78.tar.gz markdown-rs-e97ad954e1468b90722cf91996d7dfc069fedf78.tar.bz2 markdown-rs-e97ad954e1468b90722cf91996d7dfc069fedf78.zip |
Refactor to pass more `&str`s, work on more bytes
Diffstat (limited to '')
-rw-r--r-- | src/util/slice.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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. |