diff --git a/src/main.rs b/src/main.rs index 3dc003d..ad343e9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,10 +30,10 @@ use std::sync::mpsc::{channel, Receiver}; use std::thread::{spawn, JoinHandle}; use argparse::{ArgumentParser, StoreTrue, Collect}; -use index::InMemoryIndex; -use write::write_index_to_tmp_file; -use merge::FileMerge; -use tmp::TmpDir; +use crate::index::InMemoryIndex; +use crate::write::write_index_to_tmp_file; +use crate::merge::FileMerge; +use crate::tmp::TmpDir; /// Create an inverted index for the given list of `documents`, /// storing it in the specified `output_dir`. diff --git a/src/merge.rs b/src/merge.rs index 038dfc5..2a1adc7 100644 --- a/src/merge.rs +++ b/src/merge.rs @@ -3,9 +3,9 @@ use std::io::{self, BufWriter}; use std::mem; use std::path::{Path, PathBuf}; -use tmp::TmpDir; -use read::IndexFileReader; -use write::IndexFileWriter; +use crate::tmp::TmpDir; +use crate::read::IndexFileReader; +use crate::write::IndexFileWriter; pub struct FileMerge { output_dir: PathBuf, diff --git a/src/read.rs b/src/read.rs index 30f50df..460a797 100644 --- a/src/read.rs +++ b/src/read.rs @@ -6,7 +6,7 @@ use std::io::prelude::*; use std::io::{self, BufReader, SeekFrom}; use std::path::Path; use byteorder::{LittleEndian, ReadBytesExt}; -use write::IndexFileWriter; +use crate::write::IndexFileWriter; /// A `IndexFileReader` does a single linear pass over an index file from /// beginning to end. Needless to say, this is not how an index is normally diff --git a/src/write.rs b/src/write.rs index ee30c60..b42f384 100644 --- a/src/write.rs +++ b/src/write.rs @@ -2,8 +2,8 @@ use std::fs::File; use std::io::{self, BufWriter, SeekFrom}; use std::io::prelude::*; use std::path::PathBuf; -use index::InMemoryIndex; -use tmp::TmpDir; +use crate::index::InMemoryIndex; +use crate::tmp::TmpDir; use byteorder::{LittleEndian, WriteBytesExt}; /// Writer for saving an index to a binary file.