From 7ed3f00b1e6306d7488fbcd7230df9971547e4c1 Mon Sep 17 00:00:00 2001 From: Irevoire Date: Tue, 25 Oct 2022 10:59:06 +0200 Subject: [PATCH] reformat --- index-scheduler/src/lib.rs | 15 ++++++--------- index-scheduler/src/snapshot.rs | 7 +------ 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index b4e3592f4..c52813e06 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -29,13 +29,6 @@ mod utils; pub type Result = std::result::Result; pub type TaskId = u32; -use dump::{KindDump, TaskDump, UpdateFile}; -pub use error::Error; -use meilisearch_types::milli::documents::DocumentsBatchBuilder; -use meilisearch_types::tasks::{Kind, KindWithContent, Status, Task}; - -use utils::{keep_tasks_within_datetimes, map_bound}; - use std::ops::{Bound, RangeBounds}; use std::path::PathBuf; use std::sync::atomic::AtomicBool; @@ -43,16 +36,21 @@ use std::sync::atomic::Ordering::Relaxed; use std::sync::{Arc, RwLock}; use std::time::Duration; +use dump::{KindDump, TaskDump, UpdateFile}; +pub use error::Error; use file_store::FileStore; use meilisearch_types::error::ResponseError; use meilisearch_types::heed::types::{OwnedType, SerdeBincode, SerdeJson, Str}; use meilisearch_types::heed::{self, Database, Env}; use meilisearch_types::milli; +use meilisearch_types::milli::documents::DocumentsBatchBuilder; use meilisearch_types::milli::update::IndexerConfig; use meilisearch_types::milli::{CboRoaringBitmapCodec, Index, RoaringBitmapCodec, BEU32}; +use meilisearch_types::tasks::{Kind, KindWithContent, Status, Task}; use roaring::RoaringBitmap; use synchronoise::SignalEvent; use time::OffsetDateTime; +use utils::{keep_tasks_within_datetimes, map_bound}; use uuid::Uuid; use crate::index_mapper::IndexMapper; @@ -933,9 +931,8 @@ mod tests { use time::Duration; use uuid::Uuid; - use crate::snapshot::{snapshot_bitmap, snapshot_index_scheduler}; - use super::*; + use crate::snapshot::{snapshot_bitmap, snapshot_index_scheduler}; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum FailureLocation { diff --git a/index-scheduler/src/snapshot.rs b/index-scheduler/src/snapshot.rs index 83a547451..902a3b18f 100644 --- a/index-scheduler/src/snapshot.rs +++ b/index-scheduler/src/snapshot.rs @@ -227,11 +227,6 @@ pub fn snapshot_index_tasks(rtxn: &RoTxn, db: Database) } pub fn snapshot_index_mapper(rtxn: &RoTxn, mapper: &IndexMapper) -> String { - let names = mapper - .indexes(rtxn) - .unwrap() - .into_iter() - .map(|(n, _)| n) - .collect::>(); + let names = mapper.indexes(rtxn).unwrap().into_iter().map(|(n, _)| n).collect::>(); format!("{names:?}") }