Skip to content

Commit 37dd417

Browse files
committed
Return TaggedDocsIterator from reader::tagged_docs.
1 parent 8e039a8 commit 37dd417

File tree

2 files changed

+155
-256
lines changed

2 files changed

+155
-256
lines changed

src/librbml/lib.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -436,13 +436,11 @@ pub mod reader {
436436
}
437437
}
438438

439-
pub fn tagged_docs<F>(d: Doc, tg: usize, it: F) -> bool where
440-
F: FnMut(Doc) -> bool,
441-
{
439+
pub fn tagged_docs<'a>(d: Doc<'a>, tag: usize) -> TaggedDocsIterator<'a> {
442440
TaggedDocsIterator {
443441
iter: docs(d),
444-
tag: tg,
445-
}.all(it)
442+
tag: tag,
443+
}
446444
}
447445

448446
pub struct TaggedDocsIterator<'a> {

0 commit comments

Comments
 (0)