FYI, a third option is
mutating func next() -> Element? {
//...
defer { pos += 1 }
return pos
}
Whether it's better is a matter of opinion