From 2d33aec3723bdbeacdf59cdd2b52fa9ae5f0d443 Mon Sep 17 00:00:00 2001 From: Mansur Azatbek Date: Mon, 28 Aug 2023 17:00:14 +0600 Subject: [PATCH] refactor: improved code, removed warnings --- flexible_inspect_rs/src/rules/common_elements/mod.rs | 1 - flexible_inspect_rs/src/rules/mod.rs | 2 +- flexible_inspect_rs/src/rules/rule_bytes/convert/mod.rs | 0 flexible_inspect_rs/src/rules/rule_bytes/mod.rs | 1 + .../str_to_number.rs => rule_str/convert/mod.rs} | 2 -- flexible_inspect_rs/src/rules/rule_str/mod.rs | 1 + 6 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 flexible_inspect_rs/src/rules/rule_bytes/convert/mod.rs rename flexible_inspect_rs/src/rules/{common_elements/str_to_number.rs => rule_str/convert/mod.rs} (99%) diff --git a/flexible_inspect_rs/src/rules/common_elements/mod.rs b/flexible_inspect_rs/src/rules/common_elements/mod.rs index a142f990..cc0dd260 100644 --- a/flexible_inspect_rs/src/rules/common_elements/mod.rs +++ b/flexible_inspect_rs/src/rules/common_elements/mod.rs @@ -1,7 +1,6 @@ use self::range::RangeFormat; use super::*; pub mod range; -pub mod str_to_number; // ======================================================= /// This is reserved standard value for error filling pub const DEFAULT_CAPTURE: &str = "main_capture"; diff --git a/flexible_inspect_rs/src/rules/mod.rs b/flexible_inspect_rs/src/rules/mod.rs index ed183ff6..9073eb63 100644 --- a/flexible_inspect_rs/src/rules/mod.rs +++ b/flexible_inspect_rs/src/rules/mod.rs @@ -13,5 +13,5 @@ use log::error; use std::collections::HashMap; use std::hash::Hash; use std::hash::Hasher; -// ======================================================= +// =======================================================a pub use common_elements::*; diff --git a/flexible_inspect_rs/src/rules/rule_bytes/convert/mod.rs b/flexible_inspect_rs/src/rules/rule_bytes/convert/mod.rs new file mode 100644 index 00000000..e69de29b diff --git a/flexible_inspect_rs/src/rules/rule_bytes/mod.rs b/flexible_inspect_rs/src/rules/rule_bytes/mod.rs index 65c06884..68ca5045 100644 --- a/flexible_inspect_rs/src/rules/rule_bytes/mod.rs +++ b/flexible_inspect_rs/src/rules/rule_bytes/mod.rs @@ -2,6 +2,7 @@ mod another_traits; mod base; mod captures; +mod convert; mod init; mod modifiers; mod utils; diff --git a/flexible_inspect_rs/src/rules/common_elements/str_to_number.rs b/flexible_inspect_rs/src/rules/rule_str/convert/mod.rs similarity index 99% rename from flexible_inspect_rs/src/rules/common_elements/str_to_number.rs rename to flexible_inspect_rs/src/rules/rule_str/convert/mod.rs index 00c30659..fb7582ba 100644 --- a/flexible_inspect_rs/src/rules/common_elements/str_to_number.rs +++ b/flexible_inspect_rs/src/rules/rule_str/convert/mod.rs @@ -36,5 +36,3 @@ where None } } - - diff --git a/flexible_inspect_rs/src/rules/rule_str/mod.rs b/flexible_inspect_rs/src/rules/rule_str/mod.rs index 30d7cf69..af54a8df 100644 --- a/flexible_inspect_rs/src/rules/rule_str/mod.rs +++ b/flexible_inspect_rs/src/rules/rule_str/mod.rs @@ -2,6 +2,7 @@ mod another_traits; mod base; mod captures; +mod convert; mod init; mod modifiers; mod utils;