Skip to content

Commit

Permalink
optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
GyulyVGC committed Jan 1, 2025
1 parent 19d3286 commit 5a4914b
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 14 deletions.
5 changes: 3 additions & 2 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use clap::Parser;
use iced::{window, Task};

use crate::gui::types::message::Message;
use crate::utils::formatted_strings::APP_VERSION;
use crate::Configs;
use crate::CONFIGS;
use crate::SNIFFNET_LOWERCASE;
use clap::Parser;
use iced::{window, Task};

#[derive(Parser, Debug)]
#[command(
Expand Down
3 changes: 2 additions & 1 deletion src/configs/types/configs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::{ConfigDevice, ConfigSettings, ConfigWindow};
use once_cell::sync::Lazy;

use crate::{ConfigDevice, ConfigSettings, ConfigWindow};

pub static CONFIGS: Lazy<Configs> = Lazy::new(Configs::load);

#[derive(Default, Clone, PartialEq, Debug)]
Expand Down
3 changes: 2 additions & 1 deletion src/gui/styles/rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
#![allow(clippy::module_name_repetitions)]

use crate::StyleType;
use iced::widget::rule::{Catalog, FillMode, Style};
use iced::Color;

use crate::StyleType;

#[derive(Default)]
pub enum RuleType {
#[default]
Expand Down
7 changes: 4 additions & 3 deletions src/gui/styles/scrollbar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
#![allow(clippy::module_name_repetitions)]

use crate::gui::styles::style_constants::BORDER_ROUNDED_RADIUS;
use crate::gui::styles::types::palette::mix_colors;
use crate::StyleType;
use iced::widget::container;
use iced::widget::scrollable::{Catalog, Rail, Status, Style};
use iced::widget::scrollable::{Scrollbar, Scroller};
use iced::{Background, Border, Color};

use crate::gui::styles::style_constants::BORDER_ROUNDED_RADIUS;
use crate::gui::styles::types::palette::mix_colors;
use crate::StyleType;

#[derive(Default)]
pub enum ScrollbarType {
#[default]
Expand Down
5 changes: 3 additions & 2 deletions src/gui/styles/toggler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
#![allow(clippy::module_name_repetitions)]

use crate::gui::styles::style_constants::BORDER_WIDTH;
use crate::StyleType;
use iced::widget::toggler::{Catalog, Status, Style};
use iced::Color;

use crate::gui::styles::style_constants::BORDER_WIDTH;
use crate::StyleType;

#[derive(Default)]
pub enum TogglerType {
#[default]
Expand Down
3 changes: 2 additions & 1 deletion src/gui/types/message.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use iced::window;

use crate::gui::components::types::my_modal::MyModal;
use crate::gui::pages::types::running_page::RunningPage;
use crate::gui::pages::types::settings_page::SettingsPage;
Expand All @@ -9,7 +11,6 @@ use crate::report::types::sort_type::SortType;
use crate::utils::types::file_info::FileInfo;
use crate::utils::types::web_page::WebPage;
use crate::{ChartType, IpVersion, Language, Protocol, ReportSortType, StyleType};
use iced::window;

#[derive(Debug, Clone)]
/// Messages types that permit reacting to application interactions/subscriptions
Expand Down
10 changes: 6 additions & 4 deletions src/networking/types/host_data_states.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
use crate::countries::types::country::Country;
use crate::networking::types::host::Host;
use crate::report::types::search_parameters::SearchParameters;
use iced::widget::combo_box;
use std::collections::BTreeSet;
use std::net::IpAddr;
use std::sync::{Arc, Mutex};

use iced::widget::combo_box;

use crate::countries::types::country::Country;
use crate::networking::types::host::Host;
use crate::report::types::search_parameters::SearchParameters;

/// Struct to contain all the sets of data related to network hosts
///
/// It also stores combobox states for the host-related filters
Expand Down

0 comments on commit 5a4914b

Please sign in to comment.