Start on autoclosing pairs

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2021-10-06 16:34:57 +02:00
parent 3cb7ba0f57
commit 05d7e9c4e7
6 changed files with 174 additions and 3 deletions

View file

@ -115,6 +115,10 @@ impl Rope {
self.chunks_in_range(start..self.len()).flat_map(str::chars)
}
pub fn bytes_at(&self, start: usize) -> impl Iterator<Item = u8> + '_ {
self.chunks_in_range(start..self.len()).flat_map(str::bytes)
}
pub fn chunks<'a>(&'a self) -> Chunks<'a> {
self.chunks_in_range(0..self.len())
}