feat: Remove the Schema to/from_toml/json/bin methods

This commit is contained in:
Clément Renault 2019-09-16 14:48:33 +02:00
parent ffc29a319f
commit 35b7b58ff7
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
4 changed files with 15 additions and 61 deletions

View file

@ -6,7 +6,7 @@ use std::io::{self, BufRead, BufReader};
use std::path::{Path, PathBuf};
use std::time::Instant;
use std::error::Error;
use std::fs::File;
use std::fs::{self, File};
use diskus::Walk;
use sysinfo::{SystemExt, ProcessExt};
@ -181,8 +181,8 @@ fn main() -> Result<(), Box<dyn Error>> {
let opt = Opt::from_args();
let schema = {
let file = File::open(&opt.schema_path)?;
Schema::from_toml(file)?
let string = fs::read_to_string(&opt.schema_path)?;
toml::from_str(&string)?
};
let stop_words = match opt.stop_words {