mirror of
https://github.com/JockeTF/fimfareader.git
synced 2024-11-23 13:58:00 +01:00
Create archive module for organization
This commit is contained in:
parent
97b81eeba7
commit
b250e8e1cb
5 changed files with 13 additions and 7 deletions
|
@ -9,8 +9,8 @@ use zip::read::ZipArchive;
|
||||||
use zip::result::ZipError;
|
use zip::result::ZipError;
|
||||||
|
|
||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
use crate::parser::parse;
|
use super::parser::parse;
|
||||||
use crate::story::Story;
|
use super::story::Story;
|
||||||
|
|
||||||
pub struct Fetcher<T>
|
pub struct Fetcher<T>
|
||||||
where
|
where
|
8
src/archive/mod.rs
Normal file
8
src/archive/mod.rs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
//! Archive module.
|
||||||
|
|
||||||
|
mod fetcher;
|
||||||
|
mod parser;
|
||||||
|
mod story;
|
||||||
|
|
||||||
|
pub use fetcher::*;
|
||||||
|
pub use story::*;
|
|
@ -7,7 +7,7 @@ use std::thread::spawn;
|
||||||
use serde_json::from_str;
|
use serde_json::from_str;
|
||||||
|
|
||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
use crate::story::Story;
|
use super::story::Story;
|
||||||
|
|
||||||
const TRIM: &[char] = &['"', ',', ' ', '\t', '\n', '\r'];
|
const TRIM: &[char] = &['"', ',', ' ', '\t', '\n', '\r'];
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
//! Main module.
|
//! Main module.
|
||||||
|
|
||||||
|
pub mod archive;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod fetcher;
|
|
||||||
pub mod parser;
|
|
||||||
pub mod story;
|
|
||||||
|
|
||||||
use std::env::args;
|
use std::env::args;
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
|
|
||||||
|
use crate::archive::Fetcher;
|
||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
use crate::fetcher::Fetcher;
|
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
use Error::*;
|
use Error::*;
|
||||||
|
|
Loading…
Reference in a new issue