diff --git a/cli/src/main.rs b/cli/src/main.rs index 57d624a..ad9de3c 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -6,9 +6,7 @@ use std::io::stdout; use std::io::Write; use std::time::Instant; -use fimfareader::archive::Fetcher; -use fimfareader::error::Error; -use fimfareader::query::parse; +use fimfareader::prelude::*; fn exit(error: Error) -> ! { eprintln!("{}", error); @@ -46,7 +44,7 @@ fn main() { println!("The archive contains {} stories.", count); loop { - let filter = match parse(&input()) { + let filter = match query(&input()) { Ok(filter) => filter, Err(error) => { println!("{}", error); diff --git a/src/lib.rs b/src/lib.rs index 6081311..2997056 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,4 +2,5 @@ pub mod archive; pub mod error; +pub mod prelude; pub mod query; diff --git a/src/prelude.rs b/src/prelude.rs new file mode 100644 index 0000000..7038d93 --- /dev/null +++ b/src/prelude.rs @@ -0,0 +1,5 @@ +//! Library prelude. + +pub use crate::archive::{Fetcher, Story}; +pub use crate::error::{Error, Result}; +pub use crate::query::parse as query;