@@ -4,16 +4,16 @@ import pkg/chronos
44import pkg/ chronicles
55import pkg/ datastore/ typedds
66
7- import ../ utils/ asyncresultiterator
7+ import ../ utils/ asyncresultiter
88
99{.push raises : [].}
1010
1111type KeyVal * [T] = tuple [key: Key , value: T]
1212
13- proc toAsyncResultIterator * [T](
13+ proc toAsyncResultIter * [T](
1414 queryIter: QueryIter [T], finishOnErr: bool = true
15- ): Future [?! AsyncResultIterator [QueryResponse [T]]] {.async : (raises: [CancelledError ]).} =
16- # # Converts `QueryIter[T]` to `AsyncResultIterator [QueryResponse[T]]` and automatically
15+ ): Future [?! AsyncResultIter [QueryResponse [T]]] {.async : (raises: [CancelledError ]).} =
16+ # # Converts `QueryIter[T]` to `AsyncResultIter [QueryResponse[T]]` and automatically
1717 # # runs dispose whenever `QueryIter` finishes or whenever an error occurs (only
1818 # # if the flag finishOnErr is set to true)
1919 # #
@@ -22,7 +22,7 @@ proc toAsyncResultIterator*[T](
2222 trace " Disposing iterator"
2323 if error =? (await queryIter.dispose ()).errorOption:
2424 return failure (error)
25- return success (AsyncResultIterator [QueryResponse [T]].empty ())
25+ return success (AsyncResultIter [QueryResponse [T]].empty ())
2626
2727 var errOccurred = false
2828
@@ -42,11 +42,11 @@ proc toAsyncResultIterator*[T](
4242 proc isFinished (): bool =
4343 queryIter.finished
4444
45- AsyncResultIterator [QueryResponse [T]].new (genNext, isFinished).success
45+ AsyncResultIter [QueryResponse [T]].new (genNext, isFinished).success
4646
4747proc filterSuccess * [T](
48- iter: AsyncResultIterator [QueryResponse [T]]
49- ): Future [AsyncResultIterator [tuple [key: Key , value: T]]] {.
48+ iter: AsyncResultIter [QueryResponse [T]]
49+ ): Future [AsyncResultIter [tuple [key: Key , value: T]]] {.
5050 async : (raises: [CancelledError ])
5151.} =
5252 # # Filters out any items that are not success
0 commit comments