Skip to content

Commit

Permalink
Change iterator from returning tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdillah committed May 19, 2021
1 parent 1780f20 commit 49341e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ struct NodeQueryIter {

#[pyproto]
impl PyIterProtocol for NodeQueryIter {
fn __next__(mut slf: PyRefMut<Self>) -> IterNextOutput<(i64, Node), &str> {
fn __next__(mut slf: PyRefMut<Self>) -> IterNextOutput<Node, &str> {
if let Some(result) = slf.inner.next() {
IterNextOutput::Yield((result.0, result.1.into()))
IterNextOutput::Yield(result.1.into())
} else {
IterNextOutput::Return("Exhausted")
}
Expand Down

0 comments on commit 49341e4

Please sign in to comment.