Create archive module for organization

This commit is contained in:
Joakim Soderlund 2019-07-26 20:46:33 +00:00
parent 97b81eeba7
commit b250e8e1cb
5 changed files with 13 additions and 7 deletions

View file

@ -9,8 +9,8 @@ use zip::read::ZipArchive;
use zip::result::ZipError;
use crate::error::{Error, Result};
use crate::parser::parse;
use crate::story::Story;
use super::parser::parse;
use super::story::Story;
pub struct Fetcher<T>
where

8
src/archive/mod.rs Normal file
View file

@ -0,0 +1,8 @@
//! Archive module.
mod fetcher;
mod parser;
mod story;
pub use fetcher::*;
pub use story::*;

View file

@ -7,7 +7,7 @@ use std::thread::spawn;
use serde_json::from_str;
use crate::error::{Error, Result};
use crate::story::Story;
use super::story::Story;
const TRIM: &[char] = &['"', ',', ' ', '\t', '\n', '\r'];

View file

@ -1,15 +1,13 @@
//! Main module.
pub mod archive;
pub mod error;
pub mod fetcher;
pub mod parser;
pub mod story;
use std::env::args;
use std::time::Instant;
use crate::archive::Fetcher;
use crate::error::{Error, Result};
use crate::fetcher::Fetcher;
fn main() -> Result<()> {
use Error::*;