diff --git a/Cargo.toml b/Cargo.toml index 3344f0c..39434ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ repository = "https://github.com/tantivy-search/tantivy-cli" readme = "README.md" keywords = ["search", "information", "retrieval"] license = "MIT" +edition = "2018" [dependencies] time = "0.1" diff --git a/src/commands/bench.rs b/src/commands/bench.rs index 808ca68..69f71f3 100644 --- a/src/commands/bench.rs +++ b/src/commands/bench.rs @@ -9,7 +9,7 @@ use tantivy::collector::{Count, TopDocs}; use tantivy::query::QueryParser; use tantivy::schema::{Field, Schema}; use tantivy::Index; -use timer::TimerTree; +use crate::timer::TimerTree; pub fn run_bench_cli(matches: &ArgMatches) -> Result<(), String> { let index_path = PathBuf::from(matches.value_of("index").unwrap()); diff --git a/src/commands/index.rs b/src/commands/index.rs index d822af7..b95f5d4 100644 --- a/src/commands/index.rs +++ b/src/commands/index.rs @@ -154,7 +154,7 @@ enum DocumentSource { } impl DocumentSource { - fn read(&self) -> io::Result>> { + fn read(&self) -> io::Result>> { Ok(match self { &DocumentSource::FromPipe => BufReader::new(Box::new(io::stdin())), &DocumentSource::FromFile(ref filepath) => { diff --git a/src/commands/serve.rs b/src/commands/serve.rs index ba3b5d5..8413c13 100644 --- a/src/commands/serve.rs +++ b/src/commands/serve.rs @@ -38,7 +38,7 @@ use tantivy::{DocAddress, Score}; use tantivy::Document; use tantivy::Index; use tantivy::IndexReader; -use timer::TimerTree; +use crate::timer::TimerTree; use urlencoded::UrlEncodedQuery; pub fn run_serve_cli(matches: &ArgMatches) -> Result<(), String> {