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:
parent
6b0743bb07
commit
05e562cb3c
@ -1773,7 +1773,7 @@ mut:
|
||||
|
||||
fn (mut iter SquareIterator) next() ?int {
|
||||
if iter.idx >= iter.arr.len {
|
||||
return error('')
|
||||
return none
|
||||
}
|
||||
defer {
|
||||
iter.idx++
|
||||
|
Loading…
Reference in New Issue
Block a user