Fix Err fallout for graph/iterator.And iterator
This commit is contained in:
parent
c156fd6b1b
commit
742277e72e
2 changed files with 25 additions and 1 deletions
|
|
@ -29,6 +29,7 @@ type And struct {
|
|||
primaryIt graph.Iterator
|
||||
checkList []graph.Iterator
|
||||
result graph.Value
|
||||
err error
|
||||
runstats graph.IteratorStats
|
||||
}
|
||||
|
||||
|
|
@ -153,9 +154,16 @@ func (it *And) Next() bool {
|
|||
return graph.NextLogOut(it, curr, true)
|
||||
}
|
||||
}
|
||||
if err := graph.Err(it.primaryIt); err != nil {
|
||||
it.err = err
|
||||
}
|
||||
return graph.NextLogOut(it, nil, false)
|
||||
}
|
||||
|
||||
func (it *And) Err() error {
|
||||
return it.err
|
||||
}
|
||||
|
||||
func (it *And) Result() graph.Value {
|
||||
return it.result
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue