mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-05 01:50:42 +00:00
2018 (#585)
* removing macro import for fail-rs * Downcast-rs * matches
This commit is contained in:
@@ -90,7 +90,7 @@ use crate::Result;
|
||||
use crate::Score;
|
||||
use crate::SegmentLocalId;
|
||||
use crate::SegmentReader;
|
||||
use downcast_rs;
|
||||
use downcast_rs::impl_downcast;
|
||||
|
||||
mod count_collector;
|
||||
pub use self::count_collector::Count;
|
||||
|
||||
@@ -170,6 +170,7 @@ mod tests {
|
||||
use crate::Index;
|
||||
use crate::IndexWriter;
|
||||
use crate::TantivyError;
|
||||
use matches::assert_matches;
|
||||
|
||||
const TITLE: &str = "title";
|
||||
const SIZE: &str = "size";
|
||||
|
||||
@@ -17,6 +17,7 @@ use crate::store::StoreReader;
|
||||
use crate::termdict::TermDictionary;
|
||||
use crate::DocId;
|
||||
use crate::Result;
|
||||
use fail::fail_point;
|
||||
use std::collections::HashMap;
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -3,6 +3,7 @@ use crate::directory::error::{DeleteError, OpenReadError, OpenWriteError};
|
||||
use crate::directory::WatchCallbackList;
|
||||
use crate::directory::WritePtr;
|
||||
use crate::directory::{Directory, ReadOnlySource, WatchCallback, WatchHandle};
|
||||
use fail::fail_point;
|
||||
use std::collections::HashMap;
|
||||
use std::fmt;
|
||||
use std::io::{self, BufWriter, Cursor, Seek, SeekFrom, Write};
|
||||
|
||||
25
src/lib.rs
25
src/lib.rs
@@ -123,34 +123,9 @@ extern crate log;
|
||||
#[macro_use]
|
||||
extern crate failure;
|
||||
|
||||
#[cfg(feature = "mmap")]
|
||||
extern crate atomicwrites;
|
||||
#[cfg(feature = "mmap")]
|
||||
extern crate memmap;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate matches;
|
||||
|
||||
#[cfg(windows)]
|
||||
extern crate winapi;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate rand;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate maplit;
|
||||
|
||||
#[cfg(all(test, feature = "unstable"))]
|
||||
extern crate test;
|
||||
|
||||
#[macro_use]
|
||||
extern crate downcast_rs;
|
||||
|
||||
#[macro_use]
|
||||
extern crate fail;
|
||||
|
||||
#[cfg(feature = "mmap")]
|
||||
#[cfg(test)]
|
||||
mod functional_test;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
use super::Weight;
|
||||
use crate::core::searcher::Searcher;
|
||||
use crate::query::Explanation;
|
||||
use crate::DocAddress;
|
||||
use crate::Result;
|
||||
use crate::Term;
|
||||
use crate::{downcast_rs, DocAddress};
|
||||
use downcast_rs::impl_downcast;
|
||||
use std::collections::BTreeSet;
|
||||
use std::fmt;
|
||||
|
||||
|
||||
@@ -509,6 +509,7 @@ mod test {
|
||||
LowerCaser, SimpleTokenizer, StopWordFilter, Tokenizer, TokenizerManager,
|
||||
};
|
||||
use crate::Index;
|
||||
use matches::assert_matches;
|
||||
|
||||
fn make_query_parser() -> QueryParser {
|
||||
let mut schema_builder = Schema::builder();
|
||||
|
||||
@@ -2,7 +2,7 @@ use crate::common::BitSet;
|
||||
use crate::docset::{DocSet, SkipResult};
|
||||
use crate::DocId;
|
||||
use crate::Score;
|
||||
use downcast_rs;
|
||||
use downcast_rs::impl_downcast;
|
||||
use std::ops::DerefMut;
|
||||
|
||||
/// Scored set of documents matching a query within a specific segment.
|
||||
|
||||
@@ -356,6 +356,7 @@ mod tests {
|
||||
use crate::schema::field_type::ValueParsingError;
|
||||
use crate::schema::schema::DocParsingError::NotJSON;
|
||||
use crate::schema::*;
|
||||
use matches::{assert_matches, matches};
|
||||
use serde_json;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -334,6 +334,7 @@ mod tests {
|
||||
use crate::tokenizer::{box_tokenizer, SimpleTokenizer};
|
||||
use crate::Index;
|
||||
use crate::SnippetGenerator;
|
||||
use maplit::btreemap;
|
||||
use std::collections::BTreeMap;
|
||||
use std::iter::Iterator;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user