Fix Err fallout for graph/iterator.Not iterator

This commit is contained in:
Andrew Dunham 2015-04-14 16:58:46 -07:00
parent 1181e76ab0
commit c156fd6b1b
2 changed files with 25 additions and 0 deletions

View file

@ -12,6 +12,7 @@ type Not struct {
primaryIt graph.Iterator
allIt graph.Iterator
result graph.Value
err error
runstats graph.IteratorStats
}
@ -87,9 +88,16 @@ func (it *Not) Next() bool {
return graph.NextLogOut(it, curr, true)
}
}
if err := graph.Err(it.allIt); err != nil {
it.err = err
}
return graph.NextLogOut(it, nil, false)
}
func (it *Not) Err() error {
return it.err
}
func (it *Not) Result() graph.Value {
return it.result
}