(&self, len: usize)
| 68 | /// For use with `Vec::insert()`. |
| 69 | #[inline] |
| 70 | pub fn to_insert_index(&self, len: usize) -> usize { |
| 71 | match self { |
| 72 | InsertPosition::Start => 0, |
| 73 | InsertPosition::After(idx) => idx + 1, |
| 74 | InsertPosition::End => len, |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | /// Returns `true` if this is an insertion at the start. |
| 79 | #[inline] |