From c2ffcc4bd1e0e0b50496a7f48df9cdf2c2743d25 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Thu, 18 Feb 2021 14:59:37 +0100 Subject: [PATCH] Return an heed error from the word_documents_count method --- milli/src/index.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/milli/src/index.rs b/milli/src/index.rs index 5c5fc9895..7b83d69fc 100644 --- a/milli/src/index.rs +++ b/milli/src/index.rs @@ -356,11 +356,8 @@ impl Index { /// Returns the number of documents ids associated with the given word, /// it is much faster than deserializing the bitmap and getting the length of it. - pub fn word_documents_count(&self, rtxn: &RoTxn, word: &str) -> anyhow::Result> { - self.word_docids - .remap_data_type::() - .get(rtxn, word) - .map_err(Into::into) + pub fn word_documents_count(&self, rtxn: &RoTxn, word: &str) -> heed::Result> { + self.word_docids.remap_data_type::().get(rtxn, word) } /* documents */