From 2dfe24f067b6d8cb0e2d85f36b4cc7015cb1a82c Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 10 Oct 2021 22:47:12 +0100 Subject: [PATCH] memmap -> memmap2 --- http-ui/Cargo.toml | 2 +- http-ui/src/main.rs | 2 +- milli/Cargo.toml | 2 +- milli/src/update/index_documents/helpers/clonable_mmap.rs | 2 +- milli/src/update/index_documents/helpers/grenad_helpers.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/http-ui/Cargo.toml b/http-ui/Cargo.toml index afe29eaab..255dc165a 100644 --- a/http-ui/Cargo.toml +++ b/http-ui/Cargo.toml @@ -11,7 +11,7 @@ byte-unit = { version = "4.0.9", default-features = false, features = ["std"] } crossbeam-channel = "0.5.0" heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" } meilisearch-tokenizer = { git = "https://github.com/meilisearch/tokenizer.git", tag = "v0.2.5" } -memmap = "0.7.0" +memmap2 = "0.5.0" milli = { path = "../milli" } once_cell = "1.5.2" rayon = "1.5.0" diff --git a/http-ui/src/main.rs b/http-ui/src/main.rs index 27fc138dd..74ea3ccd8 100644 --- a/http-ui/src/main.rs +++ b/http-ui/src/main.rs @@ -860,7 +860,7 @@ async fn main() -> anyhow::Result<()> { } let file = file.into_std().await; - let mmap = unsafe { memmap::Mmap::map(&file).expect("can't map file") }; + let mmap = unsafe { memmap2::Mmap::map(&file).expect("can't map file") }; let method = match update_method.as_deref() { Some("replace") => String::from("replace"), diff --git a/milli/Cargo.toml b/milli/Cargo.toml index bf001e155..cf3582818 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -23,7 +23,7 @@ human_format = "1.0.3" levenshtein_automata = { version = "0.2.0", features = ["fst_automaton"] } linked-hash-map = "0.5.4" meilisearch-tokenizer = { git = "https://github.com/meilisearch/tokenizer.git", tag = "v0.2.5" } -memmap = "0.7.0" +memmap2 = "0.5.0" obkv = "0.2.0" once_cell = "1.5.2" ordered-float = "2.1.1" diff --git a/milli/src/update/index_documents/helpers/clonable_mmap.rs b/milli/src/update/index_documents/helpers/clonable_mmap.rs index 691d10593..1c4d78506 100644 --- a/milli/src/update/index_documents/helpers/clonable_mmap.rs +++ b/milli/src/update/index_documents/helpers/clonable_mmap.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use memmap::Mmap; +use memmap2::Mmap; /// Wrapper around Mmap allowing to virtualy clone grenad-chunks /// in a parallel process like the indexing. diff --git a/milli/src/update/index_documents/helpers/grenad_helpers.rs b/milli/src/update/index_documents/helpers/grenad_helpers.rs index fbdf2b42e..10662892b 100644 --- a/milli/src/update/index_documents/helpers/grenad_helpers.rs +++ b/milli/src/update/index_documents/helpers/grenad_helpers.rs @@ -70,7 +70,7 @@ pub unsafe fn into_clonable_grenad( reader: grenad::Reader, ) -> Result> { let file = reader.into_inner(); - let mmap = memmap::Mmap::map(&file)?; + let mmap = memmap2::Mmap::map(&file)?; let cursor = io::Cursor::new(ClonableMmap::from(mmap)); let reader = grenad::Reader::new(cursor)?; Ok(reader)