refactor: move out bits/bytes enum to utils (#1211)

This commit is contained in:
Clement Tsang 2023-06-17 06:08:11 +00:00 committed by GitHub
parent 8d078f8d71
commit d6b6e0aea9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 12 deletions

View file

@ -12,14 +12,16 @@ use layout_manager::*;
pub use states::*;
use unicode_segmentation::{GraphemeCursor, UnicodeSegmentation};
use crate::widgets::{ProcWidgetColumn, ProcWidgetMode};
use crate::{
constants,
data_conversion::ConvertedData,
units::data_units::DataUnit,
utils::error::{BottomError, Result},
Pid,
};
use crate::{
utils::data_units::DataUnit,
widgets::{ProcWidgetColumn, ProcWidgetMode},
};
pub mod data_farmer;
pub mod data_harvester;

View file

@ -14,8 +14,7 @@ use crate::{
time_graph::{GraphData, TimeGraph},
tui_widget::time_chart::Point,
},
units::data_units::DataUnit,
utils::gen_util::*,
utils::{data_units::DataUnit, gen_util::*},
};
impl Painter {

View file

@ -10,7 +10,7 @@ use crate::app::{
AxisScaling,
};
use crate::components::tui_widget::time_chart::Point;
use crate::units::data_units::DataUnit;
use crate::utils::data_units::DataUnit;
use crate::utils::gen_util::*;
use crate::widgets::{DiskWidgetData, TempWidgetData};

View file

@ -47,6 +47,7 @@ use utils::error;
pub mod app;
pub mod utils {
pub mod data_units;
pub mod error;
pub mod gen_util;
pub mod logging;
@ -57,7 +58,6 @@ pub mod components;
pub mod constants;
pub mod data_conversion;
pub mod options;
pub mod units;
pub mod widgets;
pub use utils::logging::*;

View file

@ -19,8 +19,10 @@ use crate::{
app::{filter::Filter, layout_manager::*, *},
canvas::{canvas_styling::CanvasStyling, ColourScheme},
constants::*,
units::data_units::DataUnit,
utils::error::{self, BottomError},
utils::{
data_units::DataUnit,
error::{self, BottomError},
},
widgets::*,
};

View file

@ -1,4 +0,0 @@
pub mod data_units;
// FIXME: Maybe move temperature units here? idk.
// FIXME: Maybe combine this with utils?