File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ extension SortedArray {
123123 /// - Parameter index: The position of the element to remove. `index` must be a valid index of the array.
124124 /// - Returns: The element at the specified index.
125125 /// - Complexity: O(_n_), where _n_ is the length of the array.
126+ @discardableResult
126127 public mutating func remove( at index: Int ) -> Element {
127128 return _elements. remove ( at: index)
128129 }
@@ -184,6 +185,7 @@ extension SortedArray {
184185 /// - Precondition: The array must not be empty.
185186 /// - Returns: The removed element.
186187 /// - Complexity: O(_n_), where _n_ is the length of the collection.
188+ @discardableResult
187189 public mutating func removeFirst( ) -> Element {
188190 return _elements. removeFirst ( )
189191 }
@@ -193,6 +195,7 @@ extension SortedArray {
193195 /// - Precondition: The collection must not be empty.
194196 /// - Returns: The last element of the collection.
195197 /// - Complexity: O(1)
198+ @discardableResult
196199 public mutating func removeLast( ) -> Element {
197200 return _elements. removeLast ( )
198201 }
You can’t perform that action at this time.
0 commit comments