mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
RangeReplaceableCollection.insert(_:atIndex:) => .insert(_:at:)
This commit is contained in:
committed by
Max Moiseev
parent
9a9ff305f1
commit
727f011314
@@ -722,7 +722,7 @@ extension ${Self} : _ArrayType {
|
||||
/// - Requires: `i <= count`.
|
||||
///
|
||||
/// - Complexity: O(`self.count`).
|
||||
public mutating func insert(newElement: Element, atIndex i: Int) {
|
||||
public mutating func insert(newElement: Element, at i: Int) {
|
||||
_checkIndex(i)
|
||||
self.replaceSubrange(i..<i, with: CollectionOfOne(newElement))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user