Address review comments

This commit is contained in:
Andrew Dunham 2015-04-15 16:28:13 -07:00
parent 430ff507f0
commit 5eed4d9667
19 changed files with 125 additions and 139 deletions

View file

@ -90,11 +90,11 @@ func (it *Optional) Result() graph.Value {
// optional subbranch.
func (it *Optional) NextPath() bool {
if it.lastCheck {
ret := it.subIt.NextPath()
if !ret {
ok := it.subIt.NextPath()
if !ok {
it.err = it.subIt.Err()
}
return ret
return ok
}
return false
}