make the project compile again

This commit is contained in:
Tamo 2022-09-07 20:38:57 +02:00 committed by Clément Renault
parent 46b8ebcab4
commit 7879189c6b
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
3 changed files with 8 additions and 8 deletions

View File

@ -124,8 +124,8 @@ impl Index {
self.settings_txn(&txn) self.settings_txn(&txn)
} }
pub fn name(&self) -> String { pub fn name(&self) -> &str {
self.name &self.name
} }
pub fn settings_txn(&self, txn: &RoTxn) -> Result<Settings<Checked>> { pub fn settings_txn(&self, txn: &RoTxn) -> Result<Settings<Checked>> {

View File

@ -215,7 +215,7 @@ impl IndexScheduler {
continue; continue;
} }
}; };
let batch = match self.get_next_batch(&wtxn) { let mut batch = match self.get_next_batch(&wtxn) {
Ok(batch) => batch, Ok(batch) => batch,
Err(e) => { Err(e) => {
log::error!("{}", e); log::error!("{}", e);
@ -232,7 +232,7 @@ impl IndexScheduler {
fn process_batch(&self, wtxn: &mut RwTxn, batch: &mut Batch) -> Result<()> { fn process_batch(&self, wtxn: &mut RwTxn, batch: &mut Batch) -> Result<()> {
match batch { match batch {
Batch::One(task) => match task.kind { Batch::One(task) => match &task.kind {
KindWithContent::ClearAllDocuments { index_name } => { KindWithContent::ClearAllDocuments { index_name } => {
self.index(&index_name)?.clear_documents()?; self.index(&index_name)?.clear_documents()?;
} }

View File

@ -50,22 +50,22 @@ impl IndexScheduler {
.ok_or(Error::CorruptedTaskQueue)?; .ok_or(Error::CorruptedTaskQueue)?;
if old_task.status != task.status { if old_task.status != task.status {
self.update_status(wtxn, old_task.status, |bitmap| { self.update_status(wtxn, old_task.status, |mut bitmap| {
bitmap.remove(task.uid); bitmap.remove(task.uid);
bitmap bitmap
})?; })?;
self.update_status(wtxn, task.status, |bitmap| { self.update_status(wtxn, task.status, |mut bitmap| {
bitmap.insert(task.uid); bitmap.insert(task.uid);
bitmap bitmap
})?; })?;
} }
if old_task.kind.as_kind() != task.kind.as_kind() { if old_task.kind.as_kind() != task.kind.as_kind() {
self.update_kind(wtxn, old_task.kind.as_kind(), |bitmap| { self.update_kind(wtxn, old_task.kind.as_kind(), |mut bitmap| {
bitmap.remove(task.uid); bitmap.remove(task.uid);
bitmap bitmap
})?; })?;
self.update_kind(wtxn, task.kind.as_kind(), |bitmap| { self.update_kind(wtxn, task.kind.as_kind(), |mut bitmap| {
bitmap.insert(task.uid); bitmap.insert(task.uid);
bitmap bitmap
})?; })?;