From d32dff1da9a296e11a560d91a3e5399f31926d74 Mon Sep 17 00:00:00 2001 From: Paul Masurel Date: Wed, 22 Feb 2017 10:50:25 +0900 Subject: [PATCH] NOBUG added advance_block --- src/postings/mod.rs | 2 +- src/postings/segment_postings.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/postings/mod.rs b/src/postings/mod.rs index d0ecdb9f5..acf1db532 100644 --- a/src/postings/mod.rs +++ b/src/postings/mod.rs @@ -263,7 +263,7 @@ mod tests { b.iter(|| { let mut segment_postings = segment_reader.read_postings(&*TERM_A, SegmentPostingsOption::NoFreq).unwrap(); - while segment_postings.advance() {} + while segment_postings.advance_block() {} }); } diff --git a/src/postings/segment_postings.rs b/src/postings/segment_postings.rs index 894caf76e..fccb31170 100644 --- a/src/postings/segment_postings.rs +++ b/src/postings/segment_postings.rs @@ -103,7 +103,10 @@ impl<'a> SegmentPostings<'a> { } } - + pub fn advance_block(&mut self) -> bool { + self.block_cursor.advance() + } + /// Returns an empty segment postings object pub fn empty() -> SegmentPostings<'static> { let empty_block_cursor = SegmentPostingsBlockCursor::empty();