mirror of
https://github.com/JockeTF/fimfareader.git
synced 2024-11-27 07:28:00 +01:00
Add prelude to library crate
This commit is contained in:
parent
0df8b3aded
commit
a2d140f815
3 changed files with 8 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
|
||||
pub mod archive;
|
||||
pub mod error;
|
||||
pub mod prelude;
|
||||
pub mod query;
|
||||
|
|
5
src/prelude.rs
Normal file
5
src/prelude.rs
Normal file
|
@ -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;
|
Loading…
Reference in a new issue