Skip to content

Commit

Permalink
former : experimenting
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandalen committed Mar 23, 2024
1 parent bfb3215 commit a8b2279
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions module/core/former/src/axiomatic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion module/core/former/src/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 >
{
Expand Down
14 changes: 12 additions & 2 deletions module/core/former/tests/inc/former_tests/container_former_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,25 @@ 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 >,
{
}

#[ test ]
fn push()
{

// f1( the_module::ReturnStorage );
// f0( former::VectorDefinition::< String, (), the_module::ReturnStorage >::new() );
// f1::< former::VectorDefinition< String, (), the_module::ReturnStorage >, _ >( the_module::ReturnStorage );

//

Expand Down

0 comments on commit a8b2279

Please sign in to comment.