Skip to content

Commit

Permalink
Code imprvs
Browse files Browse the repository at this point in the history
  • Loading branch information
tonikocjan committed May 13, 2024
1 parent ce478e8 commit e578dec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sources/Core/Extensions/Foundation/Collection+PovioKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public extension Collection {
}

public extension MutableCollection {
mutating func mutateEach(_ f: (inout Element) throws -> Void) rethrows {
var i = startIndex
while i != endIndex {
try f(&self[i])
formIndex(after: &i)
mutating func mutateEach(_ mutator: (inout Element) throws -> Void) rethrows {
var idx = startIndex
while idx != endIndex {
try mutator(&self[idx])
formIndex(after: &idx)
}
}
}

0 comments on commit e578dec

Please sign in to comment.