From d545dfe424df033d9948d616c01b9259dad00628 Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 01:57:11 +0300 Subject: [PATCH 01/16] feat(strs_tools): Manually implement SplitOptionsFormer setters and form method --- module/core/strs_tools/src/string/split.rs | 51 ++++++++++++++++++---- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/module/core/strs_tools/src/string/split.rs b/module/core/strs_tools/src/string/split.rs index 027a2aca88..6bc674045d 100644 --- a/module/core/strs_tools/src/string/split.rs +++ b/module/core/strs_tools/src/string/split.rs @@ -443,13 +443,13 @@ mod private quoting_prefixes : Vec< &'a str >, quoting_postfixes : Vec< &'a str >, } - builder_impls_from! - ( - SplitOptionsFormer, - ( preserving_empty, bool ), ( preserving_delimeters, bool ), ( preserving_quoting, bool ), - ( stripping, bool ), ( quoting, bool ), - ( quoting_prefixes, Vec< &'a str > ), ( quoting_postfixes, Vec< &'a str > ), - ); + // builder_impls_from! + // ( + // SplitOptionsFormer, + // ( preserving_empty, bool ), ( preserving_delimeters, bool ), ( preserving_quoting, bool ), + // ( stripping, bool ), ( quoting, bool ), + // ( quoting_prefixes, Vec< &'a str > ), ( quoting_postfixes, Vec< &'a str > ), + // ); impl< 'a > SplitOptionsFormer< 'a > { @@ -465,9 +465,44 @@ mod private quoting_prefixes : vec![], quoting_postfixes : vec![], } } + + // Manually added setters + pub fn preserving_empty( &mut self, value : bool ) -> &mut Self { self.preserving_empty = value; self } + pub fn preserving_delimeters( &mut self, value : bool ) -> &mut Self { self.preserving_delimeters = value; self } + pub fn preserving_quoting( &mut self, value : bool ) -> &mut Self { self.preserving_quoting = value; self } + pub fn stripping( &mut self, value : bool ) -> &mut Self { self.stripping = value; self } + pub fn quoting( &mut self, value : bool ) -> &mut Self { self.quoting = value; self } + pub fn quoting_prefixes( &mut self, value : Vec< &'a str > ) -> &mut Self { self.quoting_prefixes = value; self } + pub fn quoting_postfixes( &mut self, value : Vec< &'a str > ) -> &mut Self { self.quoting_postfixes = value; self } + + // Existing methods that were likely part of the manual impl before, or should be retained + pub fn src( &mut self, value : &'a str ) -> &mut Self { self.src = value; self } pub fn delimeter< D : Into< OpType< &'a str > > >( &mut self, value : D ) -> &mut Self { self.delimeter = OpType::Vector( vec![] ).append( value.into() ); self } - pub fn src( &mut self, value : &'a str ) -> &mut Self { self.src = value; self } + + // Manually added form method + pub fn form( &mut self ) -> SplitOptions< 'a, Vec< &'a str > > + { + if self.quoting + { + if self.quoting_prefixes.is_empty() { self.quoting_prefixes = vec![ "\"", "`", "'" ]; } + if self.quoting_postfixes.is_empty() { self.quoting_postfixes = vec![ "\"", "`", "'" ]; } + } + SplitOptions + { + src : self.src, + delimeter : self.delimeter.clone().vector().unwrap(), + preserving_empty : self.preserving_empty, + preserving_delimeters : self.preserving_delimeters, + preserving_quoting : self.preserving_quoting, + stripping : self.stripping, + quoting : self.quoting, + quoting_prefixes : self.quoting_prefixes.clone(), + quoting_postfixes : self.quoting_postfixes.clone(), + } + } + + // Existing perform method pub fn perform( &mut self ) -> SplitIterator< 'a > { self.form().split() } } From 451c5c74d0e394bab08338428bcad59641336a62 Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 02:01:05 +0300 Subject: [PATCH 02/16] refactor(strs_tools): Remove builder_impls_from macro and definition --- module/core/strs_tools/src/string/split.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/core/strs_tools/src/string/split.rs b/module/core/strs_tools/src/string/split.rs index 6bc674045d..f9fd71986f 100644 --- a/module/core/strs_tools/src/string/split.rs +++ b/module/core/strs_tools/src/string/split.rs @@ -398,6 +398,7 @@ mod private fn quoting_postfixes( &self ) -> &Vec< &'a str > { &self.quoting_postfixes } } + /* macro_rules! builder_impls_from { ( $name : ident, $( ( $field : ident, $type : ty ) ),* $( , )? ) => @@ -428,6 +429,7 @@ mod private } } } + */ #[ allow( clippy::struct_excessive_bools ) ] #[ derive( Debug ) ] From b1d202b1b286466ae1556f17891fd2a31d3a204d Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 02:13:07 +0300 Subject: [PATCH 03/16] strs_tools : better readme --- module/core/strs_tools/Readme.md | 37 +++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/module/core/strs_tools/Readme.md b/module/core/strs_tools/Readme.md index 2f8bab872e..f8ee799f4b 100644 --- a/module/core/strs_tools/Readme.md +++ b/module/core/strs_tools/Readme.md @@ -1,5 +1,5 @@ - + # Module :: `strs_tools` [![experimental](https://raster.shields.io/static/v1?label=&message=experimental&color=orange)](https://github.com/emersion/stability-badges#experimental) [![rust-status](https://github.com/Wandalen/wTools/actions/workflows/module_strs_tools_push.yml/badge.svg)](https://github.com/Wandalen/wTools/actions/workflows/module_strs_tools_push.yml) [![docs.rs](https://img.shields.io/docsrs/strs_tools?color=e3e8f0&logo=docs.rs)](https://docs.rs/strs_tools) [![Open in Gitpod](https://raster.shields.io/static/v1?label=try&message=online&color=eee&logo=gitpod&logoColor=eee)](https://gitpod.io/#RUN_PATH=.,SAMPLE_FILE=module%2Fcore%2Fstrs_tools%2Fexamples%2Fstrs_tools_trivial.rs,RUN_POSTFIX=--example%20module%2Fcore%2Fstrs_tools%2Fexamples%2Fstrs_tools_trivial.rs/https://github.com/Wandalen/wTools) [![discord](https://img.shields.io/discord/872391416519737405?color=eee&logo=discord&logoColor=eee&label=ask)](https://discord.gg/m3YfbXpUUY) @@ -12,7 +12,7 @@ Tools to manipulate strings. ```rust -#[ cfg( all( feature = "split", not( feature = "no_std" ) ) ) ] +#[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] { /* delimeter exists */ let src = "abc def"; @@ -21,7 +21,7 @@ Tools to manipulate strings. .delimeter( " " ) .stripping( false ) .perform(); - let iterated = iter.map( | e | String::from( e ) ).collect::< Vec< _ > >(); + let iterated = iter.map( | e | String::from( e.string ) ).collect::< Vec< _ > >(); assert_eq!( iterated, vec![ "abc", " ", "def" ] ); /* delimeter not exists */ @@ -30,7 +30,7 @@ Tools to manipulate strings. .src( src ) .delimeter( "g" ) .perform(); - let iterated = iter.map( | e | String::from( e ) ).collect::< Vec< _ > >(); + let iterated = iter.map( | e | String::from( e.string ) ).collect::< Vec< _ > >(); assert_eq!( iterated, vec![ "abc def" ] ); } ``` @@ -41,17 +41,28 @@ Tools to manipulate strings. cargo add strs_tools ``` +### Features + +This crate uses a feature-based system to allow you to include only the functionality you need. Key features include: + +* `string_indentation`: Tools for adding indentation to lines of text. +* `string_isolate`: Functions to isolate parts of a string based on delimiters. +* `string_parse_request`: Utilities for parsing command-like strings with subjects and key-value parameters. +* `string_parse_number`: Functions for parsing numerical values from strings. +* `string_split`: Advanced string splitting capabilities with various options for delimiters, quoting, and segment preservation. + +You can enable features in your `Cargo.toml` file, for example: +```toml +[dependencies.strs_tools] +version = "0.18.0" # Or your desired version +features = [ "string_split", "string_indentation" ] +``` +The `default` feature enables a common set of functionalities. The `full` feature enables all available string utilities. Refer to the `Cargo.toml` for a complete list of features and their dependencies. + ### Try out from the repository ```sh git clone https://github.com/Wandalen/wTools -cd wTools -cd examples/wstring_tools_trivial -cargo run +cd wTools/module/core/strs_tools +cargo run --example strs_tools_trivial ``` - -# Sample - -[![discord](https://img.shields.io/discord/872391416519737405?color=eee&logo=discord&logoColor=eee&label=ask)](https://discord.gg/m3YfbXpUUY) -[![Open in Gitpod](https://raster.shields.io/static/v1?label=try&message=online&color=eee&logo=gitpod&logoColor=eee)](https://gitpod.io/#RUN_PATH=sample%2Frust%2Fstrs_tools_trivial,SAMPLE_FILE=.%2Fsrc%2Fmain.rs/https://github.com/Wandalen/wTools) -[![docs.rs](https://raster.shields.io/static/v1?label=docs&message=online&color=eee&logo=docsdotrs&logoColor=eee)](https://docs.rs/strs_tools) From 77a5f78a6724c200d3bf631da5366f7dff023edc Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 02:54:25 +0300 Subject: [PATCH 04/16] fix(strs_tools): Update lexical dependency to 7.0.4 --- module/core/component_model_types/Readme.md | 2 +- module/core/macro_tools/src/generic_params.rs | 3 +-- module/core/strs_tools/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/module/core/component_model_types/Readme.md b/module/core/component_model_types/Readme.md index fb9ae48ba8..723d84a2df 100644 --- a/module/core/component_model_types/Readme.md +++ b/module/core/component_model_types/Readme.md @@ -6,7 +6,7 @@ [![experimental](https://raster.shields.io/static/v1?label=&message=experimental&color=orange)](https://github.com/emersion/stability-badges#experimental) [![rust-status](https://github.com/Wandalen/wTools/actions/workflows/module_component_model_types_push.yml/badge.svg)](https://github.com/Wandalen/wTools/actions/workflows/module_component_model_types_push.yml) [![docs.rs](https://img.shields.io/docsrs/component_model_types?color=e3e8f0&logo=docs.rs)](https://docs.rs/component_model_types) [![Open in Gitpod](https://raster.shields.io/static/v1?label=try&message=online&color=eee&logo=gitpod&logoColor=eee)](https://gitpod.io/#RUN_PATH=.,SAMPLE_FILE=module%2Fcore%2Fcomponent_model_types%2Fexamples%2Fcomponent_model_types_trivial.rs,RUN_POSTFIX=--example%20module%2Fcore%2Fcomponent_model_types%2Fexamples%2Fcomponent_model_types_trivial.rs/https://github.com/Wandalen/wTools) [![discord](https://img.shields.io/discord/872391416519737405?color=eee&logo=discord&logoColor=eee&label=ask)](https://discord.gg/m3YfbXpUUY) -A flexible implementation of the Builder pattern supporting nested builders and collection-specific subcomponent_models. Its compile-time structures and traits that are not generated but reused. +A flexible implementation of the Builder pattern supporting nested builders and collection-specific `subcomponent_models`. Its compile-time structures and traits that are not generated but reused. ## Example: Using Trait Assign diff --git a/module/core/macro_tools/src/generic_params.rs b/module/core/macro_tools/src/generic_params.rs index 45c7d87eac..0e11fdeab0 100644 --- a/module/core/macro_tools/src/generic_params.rs +++ b/module/core/macro_tools/src/generic_params.rs @@ -187,8 +187,7 @@ mod private if self.syn_generics.params.is_empty() { Ok(quote::quote! { #base_ident }) - } else - { + } else { let (_, _, ty_g, _) = decompose_item_soft(self.syn_generics); Ok(quote::quote! { #base_ident ::< #ty_g > }) } diff --git a/module/core/strs_tools/Cargo.toml b/module/core/strs_tools/Cargo.toml index a7ec89cdc6..2193d472aa 100644 --- a/module/core/strs_tools/Cargo.toml +++ b/module/core/strs_tools/Cargo.toml @@ -57,7 +57,7 @@ string_split = [ "enabled" ] # Removed circular dependency on string_parse_reque string_parse = [] [dependencies] -lexical = { version = "~6.1", optional = true } +lexical = { version = "7.0.4", optional = true } component_model_types = { workspace = true, features = ["enabled"] } mod_interface = { workspace = true } mod_interface_meta = { workspace = true, features = ["enabled"] } From 03f95c3af374950cf68d8e0a8e103d750f662294 Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 03:20:59 +0300 Subject: [PATCH 05/16] refactor(component_model_types): Replace mod_interface! with expanded code and fix warnings --- .../component_assign_manual.rs | 2 +- .../components_assign_manual.rs | 32 +++++++++---------- .../inc/components_tests/composite_manual.rs | 32 +++++++++---------- module/core/component_model_types/src/lib.rs | 8 +++++ .../component_model_types/tests/inc/mod.rs | 1 - 5 files changed, 41 insertions(+), 34 deletions(-) diff --git a/module/core/component_model/tests/inc/components_tests/component_assign_manual.rs b/module/core/component_model/tests/inc/components_tests/component_assign_manual.rs index 19ac837500..142ef1750d 100644 --- a/module/core/component_model/tests/inc/components_tests/component_assign_manual.rs +++ b/module/core/component_model/tests/inc/components_tests/component_assign_manual.rs @@ -1,7 +1,7 @@ #[ allow( unused_imports ) ] use super::*; #[ allow( unused_imports ) ] -use component_model::Assign; +use the_module::Assign; #[ derive( Default, PartialEq, Debug ) ] diff --git a/module/core/component_model/tests/inc/components_tests/components_assign_manual.rs b/module/core/component_model/tests/inc/components_tests/components_assign_manual.rs index 80efe86a79..a9e0de6ed2 100644 --- a/module/core/component_model/tests/inc/components_tests/components_assign_manual.rs +++ b/module/core/component_model/tests/inc/components_tests/components_assign_manual.rs @@ -1,7 +1,7 @@ #[ allow( unused_imports ) ] use super::*; #[ allow( unused_imports ) ] -use component_model::{ Assign, AssignWithType }; +use the_module::{ Assign, AssignWithType }; /// /// Options1 @@ -42,7 +42,7 @@ impl From< &Options1 > for f32 } } -impl< IntoT > component_model::Assign< i32, IntoT > for Options1 +impl< IntoT > the_module::Assign< i32, IntoT > for Options1 where IntoT : Into< i32 >, { @@ -53,7 +53,7 @@ where } } -impl< IntoT > component_model::Assign< String, IntoT > for Options1 +impl< IntoT > the_module::Assign< String, IntoT > for Options1 where IntoT : Into< String >, { @@ -64,7 +64,7 @@ where } } -impl< IntoT > component_model::Assign< f32, IntoT > for Options1 +impl< IntoT > the_module::Assign< f32, IntoT > for Options1 where IntoT : Into< f32 >, { @@ -93,9 +93,9 @@ where // #[ allow( dead_code ) ] impl< T, IntoT > Options1ComponentsAssign< IntoT > for T where - T : component_model::Assign< i32, IntoT >, - T : component_model::Assign< String, IntoT >, - T : component_model::Assign< f32, IntoT >, + T : the_module::Assign< i32, IntoT >, + T : the_module::Assign< String, IntoT >, + T : the_module::Assign< f32, IntoT >, IntoT : Into< i32 >, IntoT : Into< String >, IntoT : Into< f32 >, @@ -104,9 +104,9 @@ where #[ inline( always ) ] fn options_1_assign( &mut self, component : IntoT ) { - component_model::Assign::< i32, _ >::assign( self, component.clone() ); - component_model::Assign::< String, _ >::assign( self, component.clone() ); - component_model::Assign::< f32, _ >::assign( self, component.clone() ); + the_module::Assign::< i32, _ >::assign( self, component.clone() ); + the_module::Assign::< String, _ >::assign( self, component.clone() ); + the_module::Assign::< f32, _ >::assign( self, component.clone() ); } } @@ -139,7 +139,7 @@ impl From< &Options2 > for String } } -impl< IntoT > component_model::Assign< i32, IntoT > for Options2 +impl< IntoT > the_module::Assign< i32, IntoT > for Options2 where IntoT : Into< i32 >, { @@ -150,7 +150,7 @@ where } } -impl< IntoT > component_model::Assign< String, IntoT > for Options2 +impl< IntoT > the_module::Assign< String, IntoT > for Options2 where IntoT : Into< String >, { @@ -176,8 +176,8 @@ where impl< T, IntoT > Options2ComponentsAssign< IntoT > for T where - T : component_model::Assign< i32, IntoT >, - T : component_model::Assign< String, IntoT >, + T : the_module::Assign< i32, IntoT >, + T : the_module::Assign< String, IntoT >, IntoT : Into< i32 >, IntoT : Into< String >, IntoT : Clone, @@ -185,8 +185,8 @@ where #[ inline( always ) ] fn options_2_assign( &mut self, component : IntoT ) { - component_model::Assign::< i32, _ >::assign( self, component.clone() ); - component_model::Assign::< String, _ >::assign( self, component.clone() ); + the_module::Assign::< i32, _ >::assign( self, component.clone() ); + the_module::Assign::< String, _ >::assign( self, component.clone() ); } } diff --git a/module/core/component_model/tests/inc/components_tests/composite_manual.rs b/module/core/component_model/tests/inc/components_tests/composite_manual.rs index 2003218fae..4f4b7b731d 100644 --- a/module/core/component_model/tests/inc/components_tests/composite_manual.rs +++ b/module/core/component_model/tests/inc/components_tests/composite_manual.rs @@ -1,7 +1,7 @@ #[ allow( unused_imports ) ] use super::*; #[ allow( unused_imports ) ] -use component_model::{ Assign, AssignWithType }; +use the_module::{ Assign, AssignWithType }; /// /// Options1 @@ -42,7 +42,7 @@ impl From< &Options1 > for f32 } } -impl< IntoT > component_model::Assign< i32, IntoT > for Options1 +impl< IntoT > the_module::Assign< i32, IntoT > for Options1 where IntoT : Into< i32 >, { @@ -53,7 +53,7 @@ where } } -impl< IntoT > component_model::Assign< String, IntoT > for Options1 +impl< IntoT > the_module::Assign< String, IntoT > for Options1 where IntoT : Into< String >, { @@ -64,7 +64,7 @@ where } } -impl< IntoT > component_model::Assign< f32, IntoT > for Options1 +impl< IntoT > the_module::Assign< f32, IntoT > for Options1 where IntoT : Into< f32 >, { @@ -91,9 +91,9 @@ where impl< T, IntoT > Options1ComponentsAssign< IntoT > for T where - T : component_model::Assign< i32, IntoT >, - T : component_model::Assign< String, IntoT >, - T : component_model::Assign< f32, IntoT >, + T : the_module::Assign< i32, IntoT >, + T : the_module::Assign< String, IntoT >, + T : the_module::Assign< f32, IntoT >, IntoT : Into< i32 >, IntoT : Into< String >, IntoT : Into< f32 >, @@ -102,9 +102,9 @@ where #[ inline( always ) ] fn options_1_assign( &mut self, component : IntoT ) { - component_model::Assign::< i32, _ >::assign( self, component.clone() ); - component_model::Assign::< String, _ >::assign( self, component.clone() ); - component_model::Assign::< f32, _ >::assign( self, component.clone() ); + the_module::Assign::< i32, _ >::assign( self, component.clone() ); + the_module::Assign::< String, _ >::assign( self, component.clone() ); + the_module::Assign::< f32, _ >::assign( self, component.clone() ); } } @@ -137,7 +137,7 @@ impl From< &Options2 > for String } } -impl< IntoT > component_model::Assign< i32, IntoT > for Options2 +impl< IntoT > the_module::Assign< i32, IntoT > for Options2 where IntoT : Into< i32 >, { @@ -148,7 +148,7 @@ where } } -impl< IntoT > component_model::Assign< String, IntoT > for Options2 +impl< IntoT > the_module::Assign< String, IntoT > for Options2 where IntoT : Into< String >, { @@ -174,8 +174,8 @@ where impl< T, IntoT > Options2ComponentsAssign< IntoT > for T where - T : component_model::Assign< i32, IntoT >, - T : component_model::Assign< String, IntoT >, + T : the_module::Assign< i32, IntoT >, + T : the_module::Assign< String, IntoT >, IntoT : Into< i32 >, IntoT : Into< String >, IntoT : Clone, @@ -183,8 +183,8 @@ where #[ inline( always ) ] fn options_2_assign( &mut self, component : IntoT ) { - component_model::Assign::< i32, _ >::assign( self, component.clone() ); - component_model::Assign::< String, _ >::assign( self, component.clone() ); + the_module::Assign::< i32, _ >::assign( self, component.clone() ); + the_module::Assign::< String, _ >::assign( self, component.clone() ); } } diff --git a/module/core/component_model_types/src/lib.rs b/module/core/component_model_types/src/lib.rs index 0afa78e30f..017db5bd9e 100644 --- a/module/core/component_model_types/src/lib.rs +++ b/module/core/component_model_types/src/lib.rs @@ -18,13 +18,16 @@ pub mod dependency #[ doc( inline ) ] #[ cfg( feature = "enabled" ) ] +#[allow(unused_imports)] pub use own::*; /// Own namespace of the module. #[ cfg( feature = "enabled" ) ] pub mod own { + #[allow(unused_imports)] use crate::*; #[ doc( inline ) ] + #[allow(unused_imports)] pub use crate::orphan::*; // Changed to crate::orphan::* } @@ -32,7 +35,9 @@ pub mod own #[ cfg( feature = "enabled" ) ] pub mod orphan { + #[allow(unused_imports)] use crate::*; #[ doc( inline ) ] + #[allow(unused_imports)] pub use crate::exposed::*; // Changed to crate::exposed::* } @@ -41,7 +46,9 @@ pub mod orphan #[ cfg( feature = "enabled" ) ] pub mod exposed { + #[allow(unused_imports)] use crate::*; #[ doc( inline ) ] + #[allow(unused_imports)] pub use crate::prelude::*; // Changed to crate::prelude::* } @@ -50,6 +57,7 @@ pub mod exposed #[ cfg( feature = "enabled" ) ] pub mod prelude { + #[allow(unused_imports)] use crate::*; #[ doc( inline ) ] #[ cfg( feature = "types_component_assign" ) ] pub use crate::component::*; // Changed to crate::component::* diff --git a/module/core/component_model_types/tests/inc/mod.rs b/module/core/component_model_types/tests/inc/mod.rs index ce297bb341..5411331197 100644 --- a/module/core/component_model_types/tests/inc/mod.rs +++ b/module/core/component_model_types/tests/inc/mod.rs @@ -6,7 +6,6 @@ mod components_tests { use super::*; - #[ cfg( feature = "types_component_from" ) ] mod component_from_manual; #[ cfg( feature = "types_component_assign" ) ] From a0636a243f3e0a48d4705d02e61316f01ec7ed73 Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 03:44:30 +0300 Subject: [PATCH 06/16] refactor(strs_tools): Replace mod_interface! in lib.rs with expanded code --- module/core/strs_tools/src/lib.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/module/core/strs_tools/src/lib.rs b/module/core/strs_tools/src/lib.rs index 7c446df4d6..5c8af69c64 100644 --- a/module/core/strs_tools/src/lib.rs +++ b/module/core/strs_tools/src/lib.rs @@ -18,8 +18,9 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - use super::*; + #[allow(unused_imports)] use super::*; pub use orphan::*; + pub use super::string; // Added pub use super::string::orphan::*; } @@ -28,8 +29,7 @@ pub mod own #[ allow( unused_imports ) ] pub mod orphan { - - use super::*; + #[allow(unused_imports)] use super::*; pub use exposed::*; } @@ -38,7 +38,8 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - use super::*; + #[allow(unused_imports)] use super::*; + pub use prelude::*; // Added pub use super::string::exposed::*; } @@ -47,6 +48,6 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - use super::*; + #[allow(unused_imports)] use super::*; pub use super::string::prelude::*; } From 73a053fdc9c36e163004a24626cc7aabbdca121c Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 09:13:47 +0300 Subject: [PATCH 07/16] refactor(strs_tools): Replace mod_interface! in string/mod.rs with expanded code --- module/core/strs_tools/src/string/mod.rs | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/module/core/strs_tools/src/string/mod.rs b/module/core/strs_tools/src/string/mod.rs index 874c55e919..80e1755cdb 100644 --- a/module/core/strs_tools/src/string/mod.rs +++ b/module/core/strs_tools/src/string/mod.rs @@ -1,4 +1,3 @@ - /// Add indentation to each line. #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] pub mod indentation; @@ -33,20 +32,29 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - - use super::*; + #[allow(unused_imports)] use super::*; pub use orphan::*; #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] + pub use super::indentation; + #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] pub use super::indentation::orphan::*; #[ cfg( all( feature = "string_isolate", not( feature = "no_std" ) ) ) ] + pub use super::isolate; + #[ cfg( all( feature = "string_isolate", not( feature = "no_std" ) ) ) ] pub use super::isolate::orphan::*; #[ cfg( all( feature = "string_parse_number", not( feature = "no_std" ) ) ) ] + pub use super::number; + #[ cfg( all( feature = "string_parse_number", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] pub use super::number::orphan::*; #[ cfg( all( feature = "string_parse_request", not( feature = "no_std" ) ) ) ] + pub use super::parse_request; + #[ cfg( all( feature = "string_parse_request", not( feature = "no_std" ) ) ) ] pub use super::parse_request::orphan::*; #[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] + pub use super::split; + #[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] pub use super::split::orphan::*; } @@ -54,8 +62,7 @@ pub mod own #[ allow( unused_imports ) ] pub mod orphan { - - use super::*; + #[allow(unused_imports)] use super::*; pub use exposed::*; } @@ -63,7 +70,8 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - use super::*; + #[allow(unused_imports)] use super::*; + pub use prelude::*; #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] pub use super::indentation::exposed::*; @@ -82,7 +90,7 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - use super::*; + #[allow(unused_imports)] use super::*; #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] pub use super::indentation::prelude::*; From 7f12e76dcc4d6de1350033de142bbe33220d5e97 Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 09:26:30 +0300 Subject: [PATCH 08/16] refactor(strs_tools): Replace mod_interface! in string submodules with expanded code --- .../core/strs_tools/src/string/indentation.rs | 13 ++-- module/core/strs_tools/src/string/isolate.rs | 11 ++-- module/core/strs_tools/src/string/number.rs | 12 ++-- .../strs_tools/src/string/parse_request.rs | 17 +++-- module/core/strs_tools/src/string/split.rs | 63 ++++++++++++++++--- 5 files changed, 79 insertions(+), 37 deletions(-) diff --git a/module/core/strs_tools/src/string/indentation.rs b/module/core/strs_tools/src/string/indentation.rs index 865364f017..4d12fb7745 100644 --- a/module/core/strs_tools/src/string/indentation.rs +++ b/module/core/strs_tools/src/string/indentation.rs @@ -77,8 +77,7 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - - use super::*; + #[allow(unused_imports)] use super::*; pub use orphan::*; pub use private:: { @@ -89,8 +88,7 @@ pub mod own #[ allow( unused_imports ) ] pub mod orphan { - - use super::*; + #[allow(unused_imports)] use super::*; pub use exposed::*; pub use private:: { @@ -101,8 +99,8 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - - use super::*; + #[allow(unused_imports)] use super::*; + pub use prelude::*; // Added pub use super::own as indentation; pub use private:: @@ -115,6 +113,5 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - - use super::*; + #[allow(unused_imports)] use super::*; } diff --git a/module/core/strs_tools/src/string/isolate.rs b/module/core/strs_tools/src/string/isolate.rs index 1845c33701..74294bbf8a 100644 --- a/module/core/strs_tools/src/string/isolate.rs +++ b/module/core/strs_tools/src/string/isolate.rs @@ -213,9 +213,10 @@ pub mod private #[ allow( unused_imports ) ] pub mod own { - use super::*; + #[allow(unused_imports)] use super::*; use super::private as i; + pub use orphan::*; // Added pub use i::IsolateOptions; // pub use i::IsolateOptionsAdapter; // Removed pub use i::isolate; @@ -229,8 +230,7 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod orphan { - - use super::*; + #[allow(unused_imports)] use super::*; pub use exposed::*; } @@ -238,7 +238,8 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - use super::*; + #[allow(unused_imports)] use super::*; + pub use prelude::*; // Added pub use super::own as isolate; use super::private as i; @@ -253,7 +254,7 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - use super::*; + #[allow(unused_imports)] use super::*; use super::private as i; // pub use i::IsolateOptionsAdapter; // Removed diff --git a/module/core/strs_tools/src/string/number.rs b/module/core/strs_tools/src/string/number.rs index a89345bba5..1db10e7dfb 100644 --- a/module/core/strs_tools/src/string/number.rs +++ b/module/core/strs_tools/src/string/number.rs @@ -11,8 +11,7 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - - use super::*; + #[allow(unused_imports)] use super::*; pub use orphan::*; pub use private:: { @@ -27,8 +26,7 @@ pub mod own #[ allow( unused_imports ) ] pub mod orphan { - - use super::*; + #[allow(unused_imports)] use super::*; pub use exposed::*; pub use private:: { @@ -39,8 +37,8 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - - use super::*; + #[allow(unused_imports)] use super::*; + pub use prelude::*; // Added pub use super::own as number; pub use private:: @@ -52,5 +50,5 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - use super::*; + #[allow(unused_imports)] use super::*; } diff --git a/module/core/strs_tools/src/string/parse_request.rs b/module/core/strs_tools/src/string/parse_request.rs index 9715ecacdd..eb38ee9d71 100644 --- a/module/core/strs_tools/src/string/parse_request.rs +++ b/module/core/strs_tools/src/string/parse_request.rs @@ -52,7 +52,7 @@ mod private } #[ allow( clippy::from_over_into ) ] - impl< T > Into > for OpType< T > + impl< T > Into> for OpType< T > { fn into( self ) -> Vec< T > { @@ -146,7 +146,7 @@ mod private pub original : &'a str, /// Delimiter for pairs `key:value`. pub key_val_delimeter : &'a str, - /// Delimeter for commands. + /// Delimiter for commands. pub commands_delimeter : &'a str, /// Parsed subject of first command. pub subject : String, @@ -544,8 +544,7 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - - use super::*; + #[allow(unused_imports)] use super::*; pub use orphan::*; pub use private:: { @@ -561,8 +560,7 @@ pub mod own #[ allow( unused_imports ) ] pub mod orphan { - - use super::*; + #[allow(unused_imports)] use super::*; pub use exposed::*; } @@ -570,8 +568,8 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - - use super::*; + #[allow(unused_imports)] use super::*; + pub use prelude::*; // Added pub use super::own as parse_request; pub use private:: @@ -585,7 +583,6 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - - use super::*; + #[allow(unused_imports)] use super::*; // pub use private::ParseOptionsAdapter; // Removed } diff --git a/module/core/strs_tools/src/string/split.rs b/module/core/strs_tools/src/string/split.rs index f9fd71986f..3bb91ea781 100644 --- a/module/core/strs_tools/src/string/split.rs +++ b/module/core/strs_tools/src/string/split.rs @@ -512,12 +512,61 @@ mod private pub fn split< 'a >() -> SplitOptionsFormer< 'a > { SplitOptionsFormer::new( <&str>::default() ) } } -mod_interface_meta::mod_interface! +#[ doc( inline ) ] +#[ allow( unused_imports ) ] +pub use own::*; + +/// Own namespace of the module. +#[ allow( unused_imports ) ] +pub mod own { - exposed use private::Split; - exposed use private::SplitType; - exposed use private::SplitFastIterator; - exposed use private::SplitIterator; - exposed use private::split; - exposed use private::SplitOptionsFormer; + #[allow(unused_imports)] use super::*; + pub use orphan::*; + pub use private:: + { + Split, + SplitType, + SplitFastIterator, + SplitIterator, + split, + SplitOptionsFormer, + }; +} + +/// Parented namespace of the module. +#[ allow( unused_imports ) ] +pub mod orphan +{ + #[allow(unused_imports)] use super::*; + pub use exposed::*; +} + +/// Exposed namespace of the module. +#[ allow( unused_imports ) ] +pub mod exposed +{ + #[allow(unused_imports)] use super::*; + pub use prelude::*; + pub use super::own as split; // Alias for the 'own' module itself + pub use private:: + { + Split, + SplitType, + SplitFastIterator, + SplitIterator, + split, // The function + SplitOptionsFormer, + }; +} + +/// Namespace of the module to include with `use module::*`. +#[ allow( unused_imports ) ] +pub mod prelude +{ + #[allow(unused_imports)] use super::*; + pub use private:: + { + SplitOptionsFormer, + split, + }; } \ No newline at end of file From 7e4f3575d86f47465103a68fabda93c7f86da842 Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 09:34:32 +0300 Subject: [PATCH 09/16] wip --- Cargo.toml | 12 +----------- module/core/strs_tools/Cargo.toml | 2 -- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 52d6ac7480..e0d95ed1ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,7 +90,7 @@ default-features = false # version = "~0.2.0" # path = "module/core/type_constructor_meta" # default-features = false - +# # [workspace.dependencies.type_constructor_make_meta] # version = "~0.2.0" # path = "module/core/type_constructor_make_meta" @@ -266,16 +266,6 @@ default-features = false version = "~0.12.0" path = "module/core/impls_index_meta" -[workspace.dependencies.mod_interface] -version = "~0.33.0" -path = "module/core/mod_interface" -default-features = false - -[workspace.dependencies.mod_interface_meta] -version = "~0.31.0" -path = "module/core/mod_interface_meta" -default-features = false - [workspace.dependencies.multilayer] version = "~0.1.3" path = "module/alias/multilayer" diff --git a/module/core/strs_tools/Cargo.toml b/module/core/strs_tools/Cargo.toml index 2193d472aa..a6a99117e3 100644 --- a/module/core/strs_tools/Cargo.toml +++ b/module/core/strs_tools/Cargo.toml @@ -59,8 +59,6 @@ string_parse = [] [dependencies] lexical = { version = "7.0.4", optional = true } component_model_types = { workspace = true, features = ["enabled"] } -mod_interface = { workspace = true } -mod_interface_meta = { workspace = true, features = ["enabled"] } [dev-dependencies] test_tools = { workspace = true } From d56f841ea9ba27c4bfe42fe2073a341166f9c239 Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 09:42:04 +0300 Subject: [PATCH 10/16] chore: Remove mod_interface and mod_interface_meta dependencies --- Cargo.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index e0d95ed1ca..d7cb0080a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -266,6 +266,16 @@ default-features = false version = "~0.12.0" path = "module/core/impls_index_meta" +[workspace.dependencies.mod_interface] +version = "~0.33.0" +path = "module/core/mod_interface" +default-features = false + +[workspace.dependencies.mod_interface_meta] +version = "~0.31.0" +path = "module/core/mod_interface_meta" +default-features = false + [workspace.dependencies.multilayer] version = "~0.1.3" path = "module/alias/multilayer" From 6e0947f57170fdbdf04589e4a1360e70d05e8592 Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 14:11:20 +0300 Subject: [PATCH 11/16] fix(strs_tools): Address clippy warnings for unused import, unused mut, and missing_docs --- .../strs_tools/src/string/parse_request.rs | 1 - module/core/strs_tools/src/string/split.rs | 34 +++++++++++++++++++ .../inc/split_test/indexing_options_tests.rs | 2 +- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/module/core/strs_tools/src/string/parse_request.rs b/module/core/strs_tools/src/string/parse_request.rs index eb38ee9d71..ba37084870 100644 --- a/module/core/strs_tools/src/string/parse_request.rs +++ b/module/core/strs_tools/src/string/parse_request.rs @@ -8,7 +8,6 @@ mod private use string:: { - split::*, isolate::isolate_right, // Keep the import for the function }; use super::*; diff --git a/module/core/strs_tools/src/string/split.rs b/module/core/strs_tools/src/string/split.rs index 3bb91ea781..27fae4a498 100644 --- a/module/core/strs_tools/src/string/split.rs +++ b/module/core/strs_tools/src/string/split.rs @@ -28,6 +28,7 @@ mod private } } + /// Defines the type of a split segment, either a delimited part or the delimiter itself. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum SplitType { @@ -37,8 +38,10 @@ mod private Delimeter, } + /// Trait for finding the position of a delimiter pattern within a string. pub trait Searcher { + /// Finds the first occurrence of the pattern in `src`. Returns a tuple of (start, end) byte indices if found. fn pos( &self, src : &str ) -> Option< ( usize, usize ) >; } @@ -79,6 +82,7 @@ mod private } } + /// A fast, low-level iterator for splitting strings based on a delimiter. Alternates between delimited segments and delimiters. #[ derive( Debug ) ] pub struct SplitFastIterator< 'a, D > where @@ -92,6 +96,7 @@ mod private impl< 'a, D : Searcher + Clone > SplitFastIterator< 'a, D > { + /// Creates a new `SplitFastIterator` with the given options. #[ allow( dead_code, clippy::needless_pass_by_value ) ] fn new( o : impl SplitOptionsAdapter< 'a, D > ) -> Self { @@ -167,6 +172,7 @@ mod private } } + /// An iterator for splitting strings with advanced options like stripping, preserving empty segments, and handling quotes. #[ derive( Debug ) ] #[ allow( clippy::struct_excessive_bools ) ] pub struct SplitIterator< 'a > @@ -184,6 +190,7 @@ mod private impl< 'a > SplitIterator< 'a > { + /// Creates a new `SplitIterator` with the given options. #[ allow( clippy::needless_pass_by_value ) ] fn new( o : impl SplitOptionsAdapter< 'a, Vec< &'a str > > ) -> Self { @@ -342,6 +349,7 @@ mod private } } + /// Options for configuring string splitting behavior for `SplitIterator` and `SplitFastIterator` generic over delimiter type. #[ derive( Debug ) ] #[ allow( clippy::struct_excessive_bools ) ] pub struct SplitOptions< 'a, D > @@ -361,6 +369,7 @@ mod private impl< 'a > SplitOptions< 'a, Vec< &'a str > > { + /// Consumes the options and returns a `SplitIterator` for splitting with a `Vec<&str>` delimiter. #[ must_use ] pub fn split( self ) -> SplitIterator< 'a > { SplitIterator::new( self ) } } @@ -369,19 +378,30 @@ mod private where D : Searcher + Default + Clone { + /// Consumes the options and returns a `SplitFastIterator` for splitting. pub fn split_fast( self ) -> SplitFastIterator< 'a, D > { SplitFastIterator::new( self ) } } + /// Adapter trait to provide a consistent interface for split options. pub trait SplitOptionsAdapter< 'a, D > where D : Clone { + /// The source string to be split. fn src( &self ) -> &'a str; + /// The delimiter(s) to split the string by. fn delimeter( &self ) -> D; + /// Whether to preserve empty segments. fn preserving_empty( &self ) -> bool; + /// Whether to preserve delimiters as part of the iteration. fn preserving_delimeters( &self ) -> bool; + /// Whether to preserve quoting characters in the output segments. fn preserving_quoting( &self ) -> bool; + /// Whether to strip leading/trailing whitespace from delimited segments. fn stripping( &self ) -> bool; + /// Whether to enable quote handling. fn quoting( &self ) -> bool; + /// Prefixes that start a quoted section. fn quoting_prefixes( &self ) -> &Vec< &'a str >; + /// Postfixes that end a quoted section. fn quoting_postfixes( &self ) -> &Vec< &'a str >; } @@ -431,6 +451,7 @@ mod private } */ + /// A builder for `SplitOptions` to configure string splitting. #[ allow( clippy::struct_excessive_bools ) ] #[ derive( Debug ) ] pub struct SplitOptionsFormer< 'a > @@ -455,6 +476,7 @@ mod private impl< 'a > SplitOptionsFormer< 'a > { + /// Creates a new `SplitOptionsFormer` with a default delimiter. pub fn new< D : Into< OpType< &'a str > > >( delimeter : D ) -> SplitOptionsFormer< 'a > { Self @@ -469,20 +491,30 @@ mod private } // Manually added setters + /// Sets whether to preserve empty segments. pub fn preserving_empty( &mut self, value : bool ) -> &mut Self { self.preserving_empty = value; self } + /// Sets whether to preserve delimiters. pub fn preserving_delimeters( &mut self, value : bool ) -> &mut Self { self.preserving_delimeters = value; self } + /// Sets whether to preserve quoting characters. pub fn preserving_quoting( &mut self, value : bool ) -> &mut Self { self.preserving_quoting = value; self } + /// Sets whether to strip whitespace from segments. pub fn stripping( &mut self, value : bool ) -> &mut Self { self.stripping = value; self } + /// Sets whether to enable quote handling. pub fn quoting( &mut self, value : bool ) -> &mut Self { self.quoting = value; self } + /// Sets the quoting prefixes. pub fn quoting_prefixes( &mut self, value : Vec< &'a str > ) -> &mut Self { self.quoting_prefixes = value; self } + /// Sets the quoting postfixes. pub fn quoting_postfixes( &mut self, value : Vec< &'a str > ) -> &mut Self { self.quoting_postfixes = value; self } // Existing methods that were likely part of the manual impl before, or should be retained + /// Sets the source string to split. pub fn src( &mut self, value : &'a str ) -> &mut Self { self.src = value; self } + /// Sets the delimiter(s). pub fn delimeter< D : Into< OpType< &'a str > > >( &mut self, value : D ) -> &mut Self { self.delimeter = OpType::Vector( vec![] ).append( value.into() ); self } // Manually added form method + /// Consumes the builder and returns `SplitOptions` configured for `Vec<&str>` delimiter. pub fn form( &mut self ) -> SplitOptions< 'a, Vec< &'a str > > { if self.quoting @@ -505,9 +537,11 @@ mod private } // Existing perform method + /// Consumes the builder, creates `SplitOptions`, and returns a `SplitIterator` for `Vec<&str>` delimiter. pub fn perform( &mut self ) -> SplitIterator< 'a > { self.form().split() } } + /// Creates a new `SplitOptionsFormer` for configuring string splitting with default options. #[ must_use ] pub fn split< 'a >() -> SplitOptionsFormer< 'a > { SplitOptionsFormer::new( <&str>::default() ) } } diff --git a/module/core/strs_tools/tests/inc/split_test/indexing_options_tests.rs b/module/core/strs_tools/tests/inc/split_test/indexing_options_tests.rs index 3ec901e128..8f160dca0a 100644 --- a/module/core/strs_tools/tests/inc/split_test/indexing_options_tests.rs +++ b/module/core/strs_tools/tests/inc/split_test/indexing_options_tests.rs @@ -33,7 +33,7 @@ fn test_m_t3_9_mod_index_first() fn test_m_t3_10_mod_index_last() { let src = "abc"; - let mut iter = split() + let iter = split() // Changed from `let mut iter` .src( src ) .delimeter( "b" ) .preserving_empty( false ) From e3ff50aedef0a0a4628510abe55e9c0ded6ecb81 Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 15:06:19 +0300 Subject: [PATCH 12/16] fix(strs_tools): Correct submodule re-export paths in string/mod.rs --- module/core/strs_tools/src/string/mod.rs | 40 ++++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/module/core/strs_tools/src/string/mod.rs b/module/core/strs_tools/src/string/mod.rs index 80e1755cdb..f1bdd5cc70 100644 --- a/module/core/strs_tools/src/string/mod.rs +++ b/module/core/strs_tools/src/string/mod.rs @@ -36,26 +36,26 @@ pub mod own pub use orphan::*; #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] - pub use super::indentation; + pub use self::indentation; // Corrected #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] - pub use super::indentation::orphan::*; + pub use self::indentation::orphan::*; // Corrected #[ cfg( all( feature = "string_isolate", not( feature = "no_std" ) ) ) ] - pub use super::isolate; + pub use self::isolate; // Corrected #[ cfg( all( feature = "string_isolate", not( feature = "no_std" ) ) ) ] - pub use super::isolate::orphan::*; + pub use self::isolate::orphan::*; // Corrected #[ cfg( all( feature = "string_parse_number", not( feature = "no_std" ) ) ) ] - pub use super::number; + pub use self::number; // Corrected #[ cfg( all( feature = "string_parse_number", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] - pub use super::number::orphan::*; + pub use self::number::orphan::*; // Corrected #[ cfg( all( feature = "string_parse_request", not( feature = "no_std" ) ) ) ] - pub use super::parse_request; + pub use self::parse_request; // Corrected #[ cfg( all( feature = "string_parse_request", not( feature = "no_std" ) ) ) ] - pub use super::parse_request::orphan::*; + pub use self::parse_request::orphan::*; // Corrected #[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] - pub use super::split; + pub use self::split; // Corrected #[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] - pub use super::split::orphan::*; + pub use self::split::orphan::*; // Corrected } /// Parented namespace of the module. @@ -74,16 +74,16 @@ pub mod exposed pub use prelude::*; #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] - pub use super::indentation::exposed::*; + pub use self::indentation::exposed::*; // Corrected #[ cfg( all( feature = "string_isolate", not( feature = "no_std" ) ) ) ] - pub use super::isolate::exposed::*; + pub use self::isolate::exposed::*; // Corrected #[ cfg( all( feature = "string_parse_number", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] - pub use super::number::exposed::*; + pub use self::number::exposed::*; // Corrected #[ cfg( all( feature = "string_parse_request", not( feature = "no_std" ) ) ) ] - pub use super::parse_request::exposed::*; + pub use self::parse_request::exposed::*; // Corrected #[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] - pub use super::split::exposed::*; + pub use self::split::exposed::*; // Corrected } /// Namespace of the module to include with `use module::*`. @@ -93,14 +93,14 @@ pub mod prelude #[allow(unused_imports)] use super::*; #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] - pub use super::indentation::prelude::*; + pub use self::indentation::prelude::*; // Corrected #[ cfg( all( feature = "string_isolate", not( feature = "no_std" ) ) ) ] - pub use super::isolate::prelude::*; + pub use self::isolate::prelude::*; // Corrected #[ cfg( all( feature = "string_parse_number", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] - pub use super::number::prelude::*; + pub use self::number::prelude::*; // Corrected #[ cfg( all( feature = "string_parse_request", not( feature = "no_std" ) ) ) ] - pub use super::parse_request::prelude::*; + pub use self::parse_request::prelude::*; // Corrected #[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] - pub use super::split::prelude::*; + pub use self::split::prelude::*; // Corrected } From a4d76398f9fa9696f4761893b142e14b8d7f42fd Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 16:34:46 +0300 Subject: [PATCH 13/16] chore: Final verification of strs_tools and component_model_types after maintenance --- module/core/strs_tools/src/string/mod.rs | 60 ++++++++++++------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/module/core/strs_tools/src/string/mod.rs b/module/core/strs_tools/src/string/mod.rs index f1bdd5cc70..d52b3708ea 100644 --- a/module/core/strs_tools/src/string/mod.rs +++ b/module/core/strs_tools/src/string/mod.rs @@ -32,30 +32,30 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - #[allow(unused_imports)] use super::*; + // Removed: #[allow(unused_imports)] use super::*; - pub use orphan::*; - #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] - pub use self::indentation; // Corrected + pub use super::orphan::*; // Corrected #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] - pub use self::indentation::orphan::*; // Corrected + // pub use self::indentation; // Removed + // #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] // Redundant cfg + pub use super::indentation::orphan::*; // Corrected #[ cfg( all( feature = "string_isolate", not( feature = "no_std" ) ) ) ] - pub use self::isolate; // Corrected - #[ cfg( all( feature = "string_isolate", not( feature = "no_std" ) ) ) ] - pub use self::isolate::orphan::*; // Corrected - #[ cfg( all( feature = "string_parse_number", not( feature = "no_std" ) ) ) ] - pub use self::number; // Corrected + // pub use self::isolate; // Removed + // #[ cfg( all( feature = "string_isolate", not( feature = "no_std" ) ) ) ] // Redundant cfg + pub use super::isolate::orphan::*; // Corrected #[ cfg( all( feature = "string_parse_number", not( feature = "no_std" ) ) ) ] + // pub use self::number; // Removed + // #[ cfg( all( feature = "string_parse_number", not( feature = "no_std" ) ) ) ] // Redundant cfg #[ allow( unused_imports ) ] - pub use self::number::orphan::*; // Corrected + pub use super::number::orphan::*; // Corrected #[ cfg( all( feature = "string_parse_request", not( feature = "no_std" ) ) ) ] - pub use self::parse_request; // Corrected - #[ cfg( all( feature = "string_parse_request", not( feature = "no_std" ) ) ) ] - pub use self::parse_request::orphan::*; // Corrected - #[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] - pub use self::split; // Corrected + // pub use self::parse_request; // Removed + // #[ cfg( all( feature = "string_parse_request", not( feature = "no_std" ) ) ) ] // Redundant cfg + pub use super::parse_request::orphan::*; // Corrected #[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] - pub use self::split::orphan::*; // Corrected + // pub use self::split; // Removed + // #[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] // Redundant cfg + pub use super::split::orphan::*; // Corrected } /// Parented namespace of the module. @@ -63,27 +63,27 @@ pub mod own pub mod orphan { #[allow(unused_imports)] use super::*; - pub use exposed::*; + pub use super::exposed::*; // Corrected } /// Exposed namespace of the module. #[ allow( unused_imports ) ] pub mod exposed { - #[allow(unused_imports)] use super::*; - pub use prelude::*; + // Removed: #[allow(unused_imports)] use super::*; + pub use super::prelude::*; // Corrected #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] - pub use self::indentation::exposed::*; // Corrected + pub use super::indentation::exposed::*; // Corrected #[ cfg( all( feature = "string_isolate", not( feature = "no_std" ) ) ) ] - pub use self::isolate::exposed::*; // Corrected + pub use super::isolate::exposed::*; // Corrected #[ cfg( all( feature = "string_parse_number", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] - pub use self::number::exposed::*; // Corrected + pub use super::number::exposed::*; // Corrected #[ cfg( all( feature = "string_parse_request", not( feature = "no_std" ) ) ) ] - pub use self::parse_request::exposed::*; // Corrected + pub use super::parse_request::exposed::*; // Corrected #[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] - pub use self::split::exposed::*; // Corrected + pub use super::split::exposed::*; // Corrected } /// Namespace of the module to include with `use module::*`. @@ -93,14 +93,14 @@ pub mod prelude #[allow(unused_imports)] use super::*; #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] - pub use self::indentation::prelude::*; // Corrected + pub use super::indentation::prelude::*; // Corrected #[ cfg( all( feature = "string_isolate", not( feature = "no_std" ) ) ) ] - pub use self::isolate::prelude::*; // Corrected + pub use super::isolate::prelude::*; // Corrected #[ cfg( all( feature = "string_parse_number", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] - pub use self::number::prelude::*; // Corrected + pub use super::number::prelude::*; // Corrected #[ cfg( all( feature = "string_parse_request", not( feature = "no_std" ) ) ) ] - pub use self::parse_request::prelude::*; // Corrected + pub use super::parse_request::prelude::*; // Corrected #[ cfg( all( feature = "string_split", not( feature = "no_std" ) ) ) ] - pub use self::split::prelude::*; // Corrected + pub use super::split::prelude::*; // Corrected } From 86c8f7447dedc479dfb77875913d6ef593c52174 Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 17:05:01 +0300 Subject: [PATCH 14/16] fix(component_model_types): Address remaining warnings from cargo test output --- module/core/component_model_types/tests/tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/module/core/component_model_types/tests/tests.rs b/module/core/component_model_types/tests/tests.rs index 5f3b8ea382..d911ef54b5 100644 --- a/module/core/component_model_types/tests/tests.rs +++ b/module/core/component_model_types/tests/tests.rs @@ -1,3 +1,4 @@ +#![allow(missing_docs)] #![ allow( unused_imports ) ] include!( "../../../../module/step/meta/src/module/aggregating.rs" ); From f7d505b447d46b2a30a1fc779fc26b357d6ae79c Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 17:25:23 +0300 Subject: [PATCH 15/16] fix(component_model_types): Add crate-level documentation to tests/tests.rs --- module/core/component_model_types/tests/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/core/component_model_types/tests/tests.rs b/module/core/component_model_types/tests/tests.rs index d911ef54b5..f2e9396a08 100644 --- a/module/core/component_model_types/tests/tests.rs +++ b/module/core/component_model_types/tests/tests.rs @@ -1,4 +1,4 @@ -#![allow(missing_docs)] +//! Integration tests for the component_model_types crate. #![ allow( unused_imports ) ] include!( "../../../../module/step/meta/src/module/aggregating.rs" ); From 90e2de471146555dfeef2f54cab4bf387e9290ae Mon Sep 17 00:00:00 2001 From: wandalen Date: Sun, 18 May 2025 17:39:43 +0300 Subject: [PATCH 16/16] proper formatting --- module/core/component_model_types/src/lib.rs | 16 ++++++++-------- .../tuple_zero_fields_manual.rs | 2 +- .../tests/inc/derive/use_as/manual_only.rs | 14 +++++++------- module/core/strs_tools/src/lib.rs | 8 ++++---- module/core/strs_tools/src/string/indentation.rs | 8 ++++---- module/core/strs_tools/src/string/isolate.rs | 8 ++++---- module/core/strs_tools/src/string/mod.rs | 8 ++++---- module/core/strs_tools/src/string/number.rs | 8 ++++---- .../core/strs_tools/src/string/parse_request.rs | 8 ++++---- module/core/strs_tools/src/string/split.rs | 8 ++++---- module/move/unilang/src/ca/parsing/engine.rs | 2 +- .../pair/pair_parametrized_main_manual_test.rs | 2 +- 12 files changed, 46 insertions(+), 46 deletions(-) diff --git a/module/core/component_model_types/src/lib.rs b/module/core/component_model_types/src/lib.rs index 017db5bd9e..0c10b3c969 100644 --- a/module/core/component_model_types/src/lib.rs +++ b/module/core/component_model_types/src/lib.rs @@ -18,16 +18,16 @@ pub mod dependency #[ doc( inline ) ] #[ cfg( feature = "enabled" ) ] -#[allow(unused_imports)] +#[ allow( unused_imports ) ] pub use own::*; /// Own namespace of the module. #[ cfg( feature = "enabled" ) ] pub mod own { - #[allow(unused_imports)] use crate::*; + #[ allow( unused_imports ) ] use crate::*; #[ doc( inline ) ] - #[allow(unused_imports)] + #[ allow( unused_imports ) ] pub use crate::orphan::*; // Changed to crate::orphan::* } @@ -35,9 +35,9 @@ pub mod own #[ cfg( feature = "enabled" ) ] pub mod orphan { - #[allow(unused_imports)] use crate::*; + #[ allow( unused_imports ) ] use crate::*; #[ doc( inline ) ] - #[allow(unused_imports)] + #[ allow( unused_imports ) ] pub use crate::exposed::*; // Changed to crate::exposed::* } @@ -46,9 +46,9 @@ pub mod orphan #[ cfg( feature = "enabled" ) ] pub mod exposed { - #[allow(unused_imports)] use crate::*; + #[ allow( unused_imports ) ] use crate::*; #[ doc( inline ) ] - #[allow(unused_imports)] + #[ allow( unused_imports ) ] pub use crate::prelude::*; // Changed to crate::prelude::* } @@ -57,7 +57,7 @@ pub mod exposed #[ cfg( feature = "enabled" ) ] pub mod prelude { - #[allow(unused_imports)] use crate::*; + #[ allow( unused_imports ) ] use crate::*; #[ doc( inline ) ] #[ cfg( feature = "types_component_assign" ) ] pub use crate::component::*; // Changed to crate::component::* diff --git a/module/core/former/tests/inc/enum_unnamed_tests/tuple_zero_fields_manual.rs b/module/core/former/tests/inc/enum_unnamed_tests/tuple_zero_fields_manual.rs index 5183b220b6..0b1f54fec5 100644 --- a/module/core/former/tests/inc/enum_unnamed_tests/tuple_zero_fields_manual.rs +++ b/module/core/former/tests/inc/enum_unnamed_tests/tuple_zero_fields_manual.rs @@ -13,7 +13,7 @@ //! - Includes shared test logic from `tuple_zero_fields_only_test.rs`. //! - The included tests call these manually implemented methods/functions and assert that the returned enum instances match the direct enum variants. This verifies the manual implementation of constructors for zero-field tuple variants. -#[allow(unused_imports)] +#[ allow( unused_imports ) ] use ::former::prelude::*; use test_tools::exposed::*; use core::fmt::Debug; diff --git a/module/core/mod_interface/tests/inc/derive/use_as/manual_only.rs b/module/core/mod_interface/tests/inc/derive/use_as/manual_only.rs index 9ce347e8fb..f6bb569e35 100644 --- a/module/core/mod_interface/tests/inc/derive/use_as/manual_only.rs +++ b/module/core/mod_interface/tests/inc/derive/use_as/manual_only.rs @@ -2,7 +2,7 @@ use layer_x as layer_a; #[doc(inline)] -#[allow(unused_imports)] +#[ allow( unused_imports ) ] pub use own :: * ; #[doc = r" Own namespace of the module."] @@ -12,11 +12,11 @@ pub mod own use super::*; #[doc(inline)] - #[allow(unused_imports)] + #[ allow( unused_imports ) ] pub use super :: orphan :: * ; #[doc(inline)] - #[allow(unused_imports)] + #[ allow( unused_imports ) ] #[doc = " layer_a"] pub use super :: layer_x :: orphan :: * ; @@ -29,7 +29,7 @@ pub mod orphan use super::*; #[doc(inline)] - #[allow(unused_imports)] + #[ allow( unused_imports ) ] pub use super :: exposed :: * ; } @@ -40,11 +40,11 @@ pub mod exposed { use super::*; #[doc(inline)] - #[allow(unused_imports)] + #[ allow( unused_imports ) ] pub use super :: prelude :: * ; #[doc(inline)] - #[allow(unused_imports)] + #[ allow( unused_imports ) ] #[doc = " layer_a"] pub use super :: layer_x :: exposed :: * ; } @@ -55,7 +55,7 @@ pub mod prelude { use super::*; #[doc(inline)] - #[allow(unused_imports)] + #[ allow( unused_imports ) ] #[doc = " layer_a"] pub use super :: layer_x :: prelude :: * ; } diff --git a/module/core/strs_tools/src/lib.rs b/module/core/strs_tools/src/lib.rs index 5c8af69c64..287e2714d3 100644 --- a/module/core/strs_tools/src/lib.rs +++ b/module/core/strs_tools/src/lib.rs @@ -18,7 +18,7 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use orphan::*; pub use super::string; // Added pub use super::string::orphan::*; @@ -29,7 +29,7 @@ pub mod own #[ allow( unused_imports ) ] pub mod orphan { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use exposed::*; } @@ -38,7 +38,7 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use prelude::*; // Added pub use super::string::exposed::*; } @@ -48,6 +48,6 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use super::string::prelude::*; } diff --git a/module/core/strs_tools/src/string/indentation.rs b/module/core/strs_tools/src/string/indentation.rs index 4d12fb7745..3322a64330 100644 --- a/module/core/strs_tools/src/string/indentation.rs +++ b/module/core/strs_tools/src/string/indentation.rs @@ -77,7 +77,7 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use orphan::*; pub use private:: { @@ -88,7 +88,7 @@ pub mod own #[ allow( unused_imports ) ] pub mod orphan { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use exposed::*; pub use private:: { @@ -99,7 +99,7 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use prelude::*; // Added pub use super::own as indentation; @@ -113,5 +113,5 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; } diff --git a/module/core/strs_tools/src/string/isolate.rs b/module/core/strs_tools/src/string/isolate.rs index 74294bbf8a..1f5738a676 100644 --- a/module/core/strs_tools/src/string/isolate.rs +++ b/module/core/strs_tools/src/string/isolate.rs @@ -213,7 +213,7 @@ pub mod private #[ allow( unused_imports ) ] pub mod own { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; use super::private as i; pub use orphan::*; // Added @@ -230,7 +230,7 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod orphan { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use exposed::*; } @@ -238,7 +238,7 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use prelude::*; // Added pub use super::own as isolate; @@ -254,7 +254,7 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; use super::private as i; // pub use i::IsolateOptionsAdapter; // Removed diff --git a/module/core/strs_tools/src/string/mod.rs b/module/core/strs_tools/src/string/mod.rs index d52b3708ea..77f98fb67c 100644 --- a/module/core/strs_tools/src/string/mod.rs +++ b/module/core/strs_tools/src/string/mod.rs @@ -32,7 +32,7 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - // Removed: #[allow(unused_imports)] use super::*; + // Removed: #[ allow( unused_imports ) ] use super::*; pub use super::orphan::*; // Corrected #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] @@ -62,7 +62,7 @@ pub mod own #[ allow( unused_imports ) ] pub mod orphan { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use super::exposed::*; // Corrected } @@ -70,7 +70,7 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - // Removed: #[allow(unused_imports)] use super::*; + // Removed: #[ allow( unused_imports ) ] use super::*; pub use super::prelude::*; // Corrected #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] @@ -90,7 +90,7 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; #[ cfg( all( feature = "string_indentation", not( feature = "no_std" ) ) ) ] #[ allow( unused_imports ) ] pub use super::indentation::prelude::*; // Corrected diff --git a/module/core/strs_tools/src/string/number.rs b/module/core/strs_tools/src/string/number.rs index 1db10e7dfb..7b632ef117 100644 --- a/module/core/strs_tools/src/string/number.rs +++ b/module/core/strs_tools/src/string/number.rs @@ -11,7 +11,7 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use orphan::*; pub use private:: { @@ -26,7 +26,7 @@ pub mod own #[ allow( unused_imports ) ] pub mod orphan { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use exposed::*; pub use private:: { @@ -37,7 +37,7 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use prelude::*; // Added pub use super::own as number; @@ -50,5 +50,5 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; } diff --git a/module/core/strs_tools/src/string/parse_request.rs b/module/core/strs_tools/src/string/parse_request.rs index ba37084870..267c3e4e42 100644 --- a/module/core/strs_tools/src/string/parse_request.rs +++ b/module/core/strs_tools/src/string/parse_request.rs @@ -543,7 +543,7 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use orphan::*; pub use private:: { @@ -559,7 +559,7 @@ pub mod own #[ allow( unused_imports ) ] pub mod orphan { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use exposed::*; } @@ -567,7 +567,7 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use prelude::*; // Added pub use super::own as parse_request; @@ -582,6 +582,6 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; // pub use private::ParseOptionsAdapter; // Removed } diff --git a/module/core/strs_tools/src/string/split.rs b/module/core/strs_tools/src/string/split.rs index 27fae4a498..1eb75926bb 100644 --- a/module/core/strs_tools/src/string/split.rs +++ b/module/core/strs_tools/src/string/split.rs @@ -554,7 +554,7 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use orphan::*; pub use private:: { @@ -571,7 +571,7 @@ pub mod own #[ allow( unused_imports ) ] pub mod orphan { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use exposed::*; } @@ -579,7 +579,7 @@ pub mod orphan #[ allow( unused_imports ) ] pub mod exposed { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use prelude::*; pub use super::own as split; // Alias for the 'own' module itself pub use private:: @@ -597,7 +597,7 @@ pub mod exposed #[ allow( unused_imports ) ] pub mod prelude { - #[allow(unused_imports)] use super::*; + #[ allow( unused_imports ) ] use super::*; pub use private:: { SplitOptionsFormer, diff --git a/module/move/unilang/src/ca/parsing/engine.rs b/module/move/unilang/src/ca/parsing/engine.rs index 337f4d1b28..dd88046034 100644 --- a/module/move/unilang/src/ca/parsing/engine.rs +++ b/module/move/unilang/src/ca/parsing/engine.rs @@ -1,6 +1,6 @@ //! Main parser logic for unilang CLI syntax. -#[allow(unused_imports)] +#[ allow( unused_imports ) ] use super::input::{ InputAbstraction, InputPart, DelimiterType, Location }; use super::instruction::GenericInstruction; use super::error::ParseError; diff --git a/module/postponed/type_constructor/tests/inc/pair/pair_parametrized_main_manual_test.rs b/module/postponed/type_constructor/tests/inc/pair/pair_parametrized_main_manual_test.rs index a4504f50c1..9a04eb26ba 100644 --- a/module/postponed/type_constructor/tests/inc/pair/pair_parametrized_main_manual_test.rs +++ b/module/postponed/type_constructor/tests/inc/pair/pair_parametrized_main_manual_test.rs @@ -1,4 +1,4 @@ -#[allow(unused_imports)] +#[ allow( unused_imports ) ] use super::*; //