Skip to content

Commit

Permalink
refactor: move conversion code to utils (#1671)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang authored Feb 7, 2025
1 parent a82d857 commit ec1a4cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
pub(crate) mod app;
mod utils {
pub(crate) mod cancellation_token;
pub(crate) mod conversion;
pub(crate) mod data_units;
pub(crate) mod general;
pub(crate) mod logging;
Expand All @@ -18,7 +19,6 @@ mod utils {
pub(crate) mod canvas;
pub(crate) mod collection;
pub(crate) mod constants;
pub(crate) mod data_conversion;
pub(crate) mod event;
pub mod options;
pub mod widgets;
Expand All @@ -45,11 +45,11 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use data_conversion::*;
use event::{handle_key_event_or_break, handle_mouse_event, BottomEvent, CollectionThreadEvent};
use options::{args, get_or_create_config, init_app};
use tui::{backend::CrosstermBackend, Terminal};
use utils::cancellation_token::CancellationToken;
use utils::conversion::*;

#[allow(unused_imports, reason = "this is needed if logging is enabled")]
use utils::logging::*;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/widgets/process_table/process_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
Painter,
},
collection::processes::{Pid, ProcessHarvest},
data_conversion::dec_bytes_per_second_string,
dec_bytes_per_second_string,
utils::data_units::{get_binary_bytes, get_decimal_bytes, GIBI_LIMIT, GIGA_LIMIT},
};

Expand Down

0 comments on commit ec1a4cb

Please sign in to comment.