Update Format Workflow (#127)

* Update Format Workflow

* Update IdentifiedArrayTests.swift
This commit is contained in:
Stephen Celis
2020-05-22 13:08:00 -04:00
committed by GitHub
parent 6001603856
commit c77bb6ceaf
3 changed files with 14 additions and 7 deletions

View File

@@ -238,7 +238,8 @@ where Element: Identifiable, ID == Element.ID {
self.init([], id: \.id)
}
public mutating func replaceSubrange<C, R>(_ subrange: R, with newElements: C) where C : Collection, R : RangeExpression, Element == C.Element, Index == R.Bound {
public mutating func replaceSubrange<C, R>(_ subrange: R, with newElements: C)
where C: Collection, R: RangeExpression, Element == C.Element, Index == R.Bound {
let replacingIds = self.ids[subrange]
let newIds = newElements.map { $0.id }
ids.replaceSubrange(subrange, with: newIds)