From c0f872e2d94a8896164b172296a1effdfcfff9db Mon Sep 17 00:00:00 2001 From: Badr Date: Wed, 25 Sep 2024 22:45:12 +0200 Subject: [PATCH] fix linting errors --- oryx-tui/src/{alert => alerts}/alert.rs | 0 oryx-tui/src/{alert => alerts}/syn_flood.rs | 0 oryx-tui/src/app.rs | 2 +- oryx-tui/src/filters/filter.rs | 6 ++++++ oryx-tui/src/lib.rs | 2 +- 5 files changed, 8 insertions(+), 2 deletions(-) rename oryx-tui/src/{alert => alerts}/alert.rs (100%) rename oryx-tui/src/{alert => alerts}/syn_flood.rs (100%) diff --git a/oryx-tui/src/alert/alert.rs b/oryx-tui/src/alerts/alert.rs similarity index 100% rename from oryx-tui/src/alert/alert.rs rename to oryx-tui/src/alerts/alert.rs diff --git a/oryx-tui/src/alert/syn_flood.rs b/oryx-tui/src/alerts/syn_flood.rs similarity index 100% rename from oryx-tui/src/alert/syn_flood.rs rename to oryx-tui/src/alerts/syn_flood.rs diff --git a/oryx-tui/src/app.rs b/oryx-tui/src/app.rs index 7180e7b..b8c405d 100644 --- a/oryx-tui/src/app.rs +++ b/oryx-tui/src/app.rs @@ -14,7 +14,7 @@ use std::time::Duration; use std::{error, thread}; use tui_big_text::{BigText, PixelSize}; -use crate::alert::alert::Alert; +use crate::alerts::alert::Alert; use crate::bandwidth::Bandwidth; use crate::filters::filter::Filter; use crate::filters::fuzzy::{self, Fuzzy}; diff --git a/oryx-tui/src/filters/filter.rs b/oryx-tui/src/filters/filter.rs index df7773b..0776156 100644 --- a/oryx-tui/src/filters/filter.rs +++ b/oryx-tui/src/filters/filter.rs @@ -46,6 +46,12 @@ pub struct Filter { pub egress_channel: FilterChannel, } +impl Default for Filter { + fn default() -> Self { + Self::new() + } +} + impl Filter { pub fn new() -> Self { Self { diff --git a/oryx-tui/src/lib.rs b/oryx-tui/src/lib.rs index d4e3ba0..2534f24 100644 --- a/oryx-tui/src/lib.rs +++ b/oryx-tui/src/lib.rs @@ -38,7 +38,7 @@ pub mod packets { pub mod transport; } -pub mod alert { +pub mod alerts { pub mod alert; pub mod syn_flood; }