From ee2165616ef7e49cceea0533fd79632d6cca87cc Mon Sep 17 00:00:00 2001 From: Jason Colburne Date: Tue, 31 Jan 2023 22:08:15 -0400 Subject: [PATCH] refactor sizage --- src/core/counter/tables.rs | 9 ++++++++- src/core/matter/tables.rs | 9 ++++++++- src/core/mod.rs | 1 - src/core/sizage.rs | 7 ------- 4 files changed, 16 insertions(+), 10 deletions(-) delete mode 100644 src/core/sizage.rs diff --git a/src/core/counter/tables.rs b/src/core/counter/tables.rs index 3c56369..cc69850 100644 --- a/src/core/counter/tables.rs +++ b/src/core/counter/tables.rs @@ -1,6 +1,13 @@ -use crate::core::sizage::Sizage; use crate::error::{Error, Result}; +#[derive(Debug, PartialEq)] +pub(crate) struct Sizage { + pub hs: u32, + pub ss: u32, + pub ls: u32, + pub fs: u32, +} + pub(crate) fn sizage(s: &str) -> Result { Ok(match s { "-A" => Sizage { hs: 2, ss: 2, fs: 4, ls: 0 }, diff --git a/src/core/matter/tables.rs b/src/core/matter/tables.rs index 289c4f5..08188e8 100644 --- a/src/core/matter/tables.rs +++ b/src/core/matter/tables.rs @@ -1,6 +1,13 @@ -use crate::core::sizage::Sizage; use crate::error::{Error, Result}; +#[derive(Debug, PartialEq)] +pub(crate) struct Sizage { + pub hs: u32, + pub ss: u32, + pub ls: u32, + pub fs: u32, +} + pub(crate) fn sizage(s: &str) -> Result { Ok(match s { "A" => Sizage { hs: 1, ss: 0, fs: 44, ls: 0 }, diff --git a/src/core/mod.rs b/src/core/mod.rs index d4de53a..0c02d6e 100644 --- a/src/core/mod.rs +++ b/src/core/mod.rs @@ -2,6 +2,5 @@ mod cigar; mod counter; mod diger; mod matter; -mod sizage; mod util; mod verfer; diff --git a/src/core/sizage.rs b/src/core/sizage.rs deleted file mode 100644 index 05362e6..0000000 --- a/src/core/sizage.rs +++ /dev/null @@ -1,7 +0,0 @@ -#[derive(Debug, PartialEq)] -pub struct Sizage { - pub hs: u32, - pub ss: u32, - pub ls: u32, - pub fs: u32, -}