The bytes before `pos` that count for no UTF-16 unit.
(&self, pos: usize)
| 144 | impl LineStarts { |
| 145 | /// The bytes before `pos` that count for no UTF-16 unit. |
| 146 | fn spare_before(&self, pos: usize) -> usize { |
| 147 | match self.wide.partition_point(|&(at, _)| at < pos) { |
| 148 | 0 => 0, |
| 149 | n => self.wide[n - 1].1, |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | impl std::ops::Deref for LineStarts { |