diff --git a/module/core/former/src/axiomatic.rs b/module/core/former/src/axiomatic.rs index 4066ae3661..af916d18ae 100644 --- a/module/core/former/src/axiomatic.rs +++ b/module/core/former/src/axiomatic.rs @@ -93,6 +93,7 @@ impl< Definition, T > FormingEnd< Definition > for ReturnStorage where Definition : FormerDefinition< Context = (), Storage = T, Formed = T, End = Self >, + // Definition::Storage : Default, { #[ inline( always ) ] fn call( &self, storage : Definition::Storage, _context : core::option::Option< () > ) -> Definition::Formed diff --git a/module/core/former/src/vector.rs b/module/core/former/src/vector.rs index cc3ba6dbac..05c695b712 100644 --- a/module/core/former/src/vector.rs +++ b/module/core/former/src/vector.rs @@ -45,7 +45,8 @@ for Vec< E > // #[ derive( Debug ) ] -pub struct VectorDefinition< E, Context = (), End = ReturnStorage > +// pub struct VectorDefinition< E, Context = (), End = ReturnStorage > +pub struct VectorDefinition< E, Context, End > where End : FormingEnd< Self > { diff --git a/module/core/former/tests/inc/former_tests/container_former_vec.rs b/module/core/former/tests/inc/former_tests/container_former_vec.rs index 68e27f6ca8..f91b48c8b8 100644 --- a/module/core/former/tests/inc/former_tests/container_former_vec.rs +++ b/module/core/former/tests/inc/former_tests/container_former_vec.rs @@ -9,7 +9,16 @@ use collection_tools::Vec; // where // Definition : FormerDefinition< Context = (), Storage = T, Formed = T, End = Self >, -pub fn f1< Definition : former::FormerDefinition >( x : Definition ) +pub fn f0< Definition >( x : Definition ) +where + Definition : former::FormerDefinition, +{ +} + +pub fn f1< Definition, End >( x : End ) +where + Definition : former::FormerDefinition, + End : former::FormingEnd< Definition >, { } @@ -17,7 +26,8 @@ pub fn f1< Definition : former::FormerDefinition >( x : Definition ) fn push() { - // f1( the_module::ReturnStorage ); + // f0( former::VectorDefinition::< String, (), the_module::ReturnStorage >::new() ); + // f1::< former::VectorDefinition< String, (), the_module::ReturnStorage >, _ >( the_module::ReturnStorage ); //