mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-03 00:50:41 +00:00
Pleasing clippy
This commit is contained in:
@@ -553,7 +553,7 @@ impl IndexWriter {
|
||||
// marks the segment updater as killed. From now on, all
|
||||
// segment updates will be ignored.
|
||||
self.segment_updater.kill();
|
||||
let document_receiver = self.operation_receiver();
|
||||
let document_receiver_res = self.operation_receiver();
|
||||
|
||||
// take the directory lock to create a new index_writer.
|
||||
let directory_lock = self
|
||||
@@ -579,7 +579,9 @@ impl IndexWriter {
|
||||
//
|
||||
// This will reach an end as the only document_sender
|
||||
// was dropped with the index_writer.
|
||||
for _ in document_receiver {}
|
||||
if let Ok(document_receiver) = document_receiver_res {
|
||||
for _ in document_receiver {}
|
||||
}
|
||||
|
||||
Ok(self.committed_opstamp)
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ impl IndexWriterStatus {
|
||||
.receive_channel
|
||||
.read()
|
||||
.expect("This lock should never be poisoned");
|
||||
rlock.as_ref().map(|receiver| receiver.clone())
|
||||
rlock.as_ref().cloned()
|
||||
}
|
||||
|
||||
/// Create an index writer bomb.
|
||||
|
||||
@@ -19,9 +19,7 @@ impl<'a> Iterator for LayerCursor<'a> {
|
||||
return None;
|
||||
}
|
||||
let (block_mut, remaining_mut) = (&mut self.block, &mut self.remaining);
|
||||
if block_mut.deserialize(remaining_mut).is_err() {
|
||||
return None;
|
||||
}
|
||||
block_mut.deserialize(remaining_mut).ok()?;
|
||||
self.cursor = 0;
|
||||
}
|
||||
let res = Some(self.block.get(self.cursor));
|
||||
|
||||
Reference in New Issue
Block a user