mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-25 04:30:40 +00:00
fixed warning
This commit is contained in:
@@ -40,10 +40,6 @@ impl SegmentSerializer {
|
||||
&mut self.fast_field_serializer
|
||||
}
|
||||
|
||||
pub fn segment(&self,) -> Segment {
|
||||
self.segment.clone()
|
||||
}
|
||||
|
||||
pub fn store_doc(&mut self, field_values_it: &mut Iterator<Item=&TextFieldValue>) -> io::Result<()> {
|
||||
let field_values: Vec<&TextFieldValue> = field_values_it.collect();
|
||||
try!(self.store_writer.store(&field_values));
|
||||
|
||||
@@ -72,9 +72,6 @@ pub struct FstMapIter<'a, V: 'static + BinarySerializable> {
|
||||
}
|
||||
|
||||
impl<'a, V: 'static + BinarySerializable> FstMapIter<'a, V> {
|
||||
|
||||
// type Item = (Vec<u8>, V);
|
||||
|
||||
pub fn next(&mut self) -> Option<(&[u8], V)> {
|
||||
let next_item = self.streamer.next();
|
||||
match next_item {
|
||||
|
||||
@@ -163,7 +163,7 @@ impl IndexMerger {
|
||||
max_val = max(max_val, u32_reader.max_val());
|
||||
u32_readers.push((reader.max_doc(), u32_reader));
|
||||
}
|
||||
fast_field_serializer.new_u32_fast_field(field, min_val, max_val);
|
||||
try!(fast_field_serializer.new_u32_fast_field(field, min_val, max_val));
|
||||
for (max_doc, u32_reader) in u32_readers {
|
||||
for doc_id in 0..max_doc {
|
||||
let val = u32_reader.get(doc_id);
|
||||
@@ -206,7 +206,6 @@ mod tests {
|
||||
use core::index::Index;
|
||||
use core::schema::Term;
|
||||
use core::collector::TestCollector;
|
||||
use super::IndexMerger;
|
||||
|
||||
#[test]
|
||||
fn test_index_merger() {
|
||||
@@ -234,7 +233,7 @@ mod tests {
|
||||
doc.set(&text_field, "a b c d");
|
||||
index_writer.add_document(doc).unwrap();
|
||||
}
|
||||
index_writer.wait();
|
||||
index_writer.wait().unwrap();
|
||||
}
|
||||
|
||||
{
|
||||
@@ -250,7 +249,7 @@ mod tests {
|
||||
doc.set(&text_field, "a b c g");
|
||||
index_writer.add_document(doc).unwrap();
|
||||
}
|
||||
index_writer.wait();
|
||||
index_writer.wait().unwrap();
|
||||
}
|
||||
}
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ mod tests {
|
||||
let mut schema = schema::Schema::new();
|
||||
let text_fieldtype = schema::TextOptions::new().set_tokenized_indexed();
|
||||
let text_field = schema.add_text_field("text", &text_fieldtype);
|
||||
let index = Index::create_from_tempdir(schema).unwrap();
|
||||
let index = Index::create_in_ram(schema);
|
||||
|
||||
{
|
||||
// writing the segment
|
||||
@@ -110,7 +110,7 @@ mod tests {
|
||||
index_writer.add_document(doc).unwrap();
|
||||
}
|
||||
//let commit_result = index_writer.commit();
|
||||
index_writer.wait();
|
||||
index_writer.wait().unwrap();
|
||||
//commit_result.unwrap();
|
||||
}
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user