1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

doc: return none instead of error in the iterator example (#16486)

This commit is contained in:
RGBCube 2022-11-19 20:11:56 +03:00 committed by GitHub
parent 6b0743bb07
commit 05e562cb3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1773,7 +1773,7 @@ mut:
fn (mut iter SquareIterator) next() ?int {
if iter.idx >= iter.arr.len {
return error('')
return none
}
defer {
iter.idx++