func remove()

in Sources/_CollectionsTestSupport/MinimalTypes/_CollectionState.swift [178:191]


  func remove(count: Int, at offset: Int) {
    precondition(count >= 0 && offset >= 0 && offset + count <= self.count)
    guard count > 0 else { return }
    switch strategy {
    case .allIndices:
      self.count -= count
    case .afterChange:
      let rest = offset ..< self.count
      self.indexValidity.replaceSubrange(rest, with: repeatElement(id, count: rest.count - count))
      self.endIndexValidity = self.id
      self.count -= count
      assert(indexValidity.count == self.count)
    }
  }