Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[ allow( unused_imports ) ]
use super::*;
#[ allow( unused_imports ) ]
use component_model::Assign;
use the_module::Assign;


#[ derive( Default, PartialEq, Debug ) ]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[ allow( unused_imports ) ]
use super::*;
#[ allow( unused_imports ) ]
use component_model::{ Assign, AssignWithType };
use the_module::{ Assign, AssignWithType };

///
/// Options1
Expand Down Expand Up @@ -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 >,
{
Expand All @@ -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 >,
{
Expand All @@ -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 >,
{
Expand Down Expand Up @@ -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 >,
Expand All @@ -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() );
}
}

Expand Down Expand Up @@ -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 >,
{
Expand All @@ -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 >,
{
Expand All @@ -176,17 +176,17 @@ 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,
{
#[ 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() );
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[ allow( unused_imports ) ]
use super::*;
#[ allow( unused_imports ) ]
use component_model::{ Assign, AssignWithType };
use the_module::{ Assign, AssignWithType };

///
/// Options1
Expand Down Expand Up @@ -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 >,
{
Expand All @@ -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 >,
{
Expand All @@ -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 >,
{
Expand All @@ -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 >,
Expand All @@ -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() );
}
}

Expand Down Expand Up @@ -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 >,
{
Expand All @@ -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 >,
{
Expand All @@ -174,17 +174,17 @@ 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,
{
#[ 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() );
}
}

Expand Down
2 changes: 1 addition & 1 deletion module/core/component_model_types/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!--{ generate.module_header.end }-->

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

Expand Down
8 changes: 8 additions & 0 deletions module/core/component_model_types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,26 @@ 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::*
}

/// Parented namespace of the module.
#[ cfg( feature = "enabled" ) ]
pub mod orphan
{
#[ allow( unused_imports ) ] use crate::*;
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use crate::exposed::*; // Changed to crate::exposed::*

}
Expand All @@ -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::*

}
Expand All @@ -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::*
Expand Down
1 change: 0 additions & 1 deletion module/core/component_model_types/tests/inc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ mod components_tests
{
use super::*;

#[ cfg( feature = "types_component_from" ) ]
mod component_from_manual;

#[ cfg( feature = "types_component_assign" ) ]
Expand Down
1 change: 1 addition & 0 deletions module/core/component_model_types/tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Integration tests for the component_model_types crate.
#![ allow( unused_imports ) ]

include!( "../../../../module/step/meta/src/module/aggregating.rs" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions module/core/macro_tools/src/generic_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 > })
}
Expand Down
14 changes: 7 additions & 7 deletions module/core/mod_interface/tests/inc/derive/use_as/manual_only.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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."]
Expand All @@ -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 :: * ;

Expand All @@ -29,7 +29,7 @@ pub mod orphan
use super::*;

#[doc(inline)]
#[allow(unused_imports)]
#[ allow( unused_imports ) ]
pub use super :: exposed :: * ;

}
Expand All @@ -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 :: * ;
}
Expand All @@ -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 :: * ;
}
4 changes: 1 addition & 3 deletions module/core/strs_tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ 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"] }

[dev-dependencies]
test_tools = { workspace = true }
Loading