Browse Source

Cargo fix edition 2018

develop
petr-tik 5 years ago
parent
commit
9f527ea85f
4 changed files with 4 additions and 3 deletions
  1. +1
    -0
      Cargo.toml
  2. +1
    -1
      src/commands/bench.rs
  3. +1
    -1
      src/commands/index.rs
  4. +1
    -1
      src/commands/serve.rs

+ 1
- 0
Cargo.toml View File

@@ -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"


+ 1
- 1
src/commands/bench.rs View File

@@ -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());


+ 1
- 1
src/commands/index.rs View File

@@ -154,7 +154,7 @@ enum DocumentSource {
}

impl DocumentSource {
fn read(&self) -> io::Result<BufReader<Box<Read>>> {
fn read(&self) -> io::Result<BufReader<Box<dyn Read>>> {
Ok(match self {
&DocumentSource::FromPipe => BufReader::new(Box::new(io::stdin())),
&DocumentSource::FromFile(ref filepath) => {


+ 1
- 1
src/commands/serve.rs View File

@@ -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> {


Loading…
Cancel
Save