smol_bytes/utf8_buffer/
ops.rs1use core::ops::Index;
2
3use super::*;
4
5impl<I> Index<I> for Utf8Buffer
6where
7 I: core::slice::SliceIndex<str>,
8{
9 type Output = I::Output;
10
11 #[cfg_attr(not(coverage), inline(always))]
12 fn index(&self, index: I) -> &Self::Output {
13 &self.as_str()[index]
14 }
15}