From 5a7fcf2688a51691079f8ec094eedf2144b1dc4d Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 7 Sep 2022 21:31:15 +0200 Subject: [PATCH] fix a few typos --- index-scheduler/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index dfd88888f..5a150ca93 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -240,7 +240,7 @@ impl IndexScheduler { self.index(&index_name)?.clear_documents()?; } KindWithContent::RenameIndex { - index_name, + index_name: _, new_name, } => { if self.available_index.get(wtxn, &new_name)?.unwrap_or(false) { @@ -260,7 +260,7 @@ impl IndexScheduler { return Err(Error::IndexAlreadyExists(index_name.to_string())); } - self.available_index.put(wtxn, &index_name, &true); + self.available_index.put(wtxn, &index_name, &true)?; // TODO: TAMO: give real info to the index let index = Index::open( index_name.to_string(), @@ -277,7 +277,6 @@ impl IndexScheduler { .insert(index_name.to_string(), index.clone()); } KindWithContent::DeleteIndex { index_name } => { - self.index_map.write(); if !self.available_index.delete(wtxn, &index_name)? { return Err(Error::IndexNotFound(index_name.to_string())); }