Skip to content

Commit

Permalink
refactor: move out bits/bytes enum to utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang committed Jun 17, 2023
1 parent 8d078f8 commit 3edf014
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
6 changes: 4 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/canvas/widgets/network_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/data_conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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::*;
Expand Down
6 changes: 4 additions & 2 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*,
};

Expand Down
4 changes: 0 additions & 4 deletions src/units.rs

This file was deleted.

File renamed without changes.

0 comments on commit 3edf014

Please sign in to comment.