mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-27 05:30:45 +00:00
code cleaning
This commit is contained in:
@@ -522,7 +522,7 @@ impl IndexWriter {
|
||||
//
|
||||
// This will reach an end as the only document_sender
|
||||
// was dropped with the index_writer.
|
||||
for _ in document_receiver.clone() {}
|
||||
for _ in document_receiver.iter() {}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -553,7 +553,7 @@ impl IndexWriter {
|
||||
self.prepare_commit_internal(false)
|
||||
}
|
||||
|
||||
pub(crate) fn prepare_commit_soft(&mut self) -> Result<PreparedCommit> {
|
||||
pub fn prepare_commit_soft(&mut self) -> Result<PreparedCommit> {
|
||||
info!("Preparing soft commit");
|
||||
self.prepare_commit_internal(true)
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ impl SegmentManager {
|
||||
// TODO make sure we use `committed_in_the_future` segments,
|
||||
// when we `commit`, to avoid replaying deletes several times.
|
||||
|
||||
} else if let Some(uncommitted_segment) = registers_lock.uncommitted.get(&segment_id) {
|
||||
} else if registers_lock.uncommitted.get(&segment_id).is_some() {
|
||||
// This will override our previous entry.
|
||||
registers_lock.uncommitted.register_segment_entry(segment_entry);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user