@@ -11,6 +11,7 @@ repository = "https://github.com/tantivy-search/tantivy-cli" | |||||
readme = "README.md" | readme = "README.md" | ||||
keywords = ["search", "information", "retrieval"] | keywords = ["search", "information", "retrieval"] | ||||
license = "MIT" | license = "MIT" | ||||
edition = "2018" | |||||
[dependencies] | [dependencies] | ||||
time = "0.1" | time = "0.1" | ||||
@@ -9,7 +9,7 @@ use tantivy::collector::{Count, TopDocs}; | |||||
use tantivy::query::QueryParser; | use tantivy::query::QueryParser; | ||||
use tantivy::schema::{Field, Schema}; | use tantivy::schema::{Field, Schema}; | ||||
use tantivy::Index; | use tantivy::Index; | ||||
use timer::TimerTree; | |||||
use crate::timer::TimerTree; | |||||
pub fn run_bench_cli(matches: &ArgMatches) -> Result<(), String> { | pub fn run_bench_cli(matches: &ArgMatches) -> Result<(), String> { | ||||
let index_path = PathBuf::from(matches.value_of("index").unwrap()); | let index_path = PathBuf::from(matches.value_of("index").unwrap()); | ||||
@@ -154,7 +154,7 @@ enum DocumentSource { | |||||
} | } | ||||
impl DocumentSource { | impl DocumentSource { | ||||
fn read(&self) -> io::Result<BufReader<Box<Read>>> { | |||||
fn read(&self) -> io::Result<BufReader<Box<dyn Read>>> { | |||||
Ok(match self { | Ok(match self { | ||||
&DocumentSource::FromPipe => BufReader::new(Box::new(io::stdin())), | &DocumentSource::FromPipe => BufReader::new(Box::new(io::stdin())), | ||||
&DocumentSource::FromFile(ref filepath) => { | &DocumentSource::FromFile(ref filepath) => { | ||||
@@ -38,7 +38,7 @@ use tantivy::{DocAddress, Score}; | |||||
use tantivy::Document; | use tantivy::Document; | ||||
use tantivy::Index; | use tantivy::Index; | ||||
use tantivy::IndexReader; | use tantivy::IndexReader; | ||||
use timer::TimerTree; | |||||
use crate::timer::TimerTree; | |||||
use urlencoded::UrlEncodedQuery; | use urlencoded::UrlEncodedQuery; | ||||
pub fn run_serve_cli(matches: &ArgMatches) -> Result<(), String> { | pub fn run_serve_cli(matches: &ArgMatches) -> Result<(), String> { | ||||