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::io::Write;
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
|
|
||||||
use fimfareader::archive::Fetcher;
|
use fimfareader::prelude::*;
|
||||||
use fimfareader::error::Error;
|
|
||||||
use fimfareader::query::parse;
|
|
||||||
|
|
||||||
fn exit(error: Error) -> ! {
|
fn exit(error: Error) -> ! {
|
||||||
eprintln!("{}", error);
|
eprintln!("{}", error);
|
||||||
|
@ -46,7 +44,7 @@ fn main() {
|
||||||
println!("The archive contains {} stories.", count);
|
println!("The archive contains {} stories.", count);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let filter = match parse(&input()) {
|
let filter = match query(&input()) {
|
||||||
Ok(filter) => filter,
|
Ok(filter) => filter,
|
||||||
Err(error) => {
|
Err(error) => {
|
||||||
println!("{}", error);
|
println!("{}", error);
|
||||||
|
|
|
@ -2,4 +2,5 @@
|
||||||
|
|
||||||
pub mod archive;
|
pub mod archive;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
|
pub mod prelude;
|
||||||
pub mod query;
|
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