Skip to content

Commit

Permalink
former : experimenting
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandalen committed Mar 30, 2024
1 parent 2fb4a30 commit af08892
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions module/core/former/tests/inc/former_tests/only_test/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,18 @@ tests_impls!
.form();
a_id!( got, 32 );

// xxx2 : continue
// // default explicit params
// let got = Struct1Former
// ::< Struct1FormerDefinition< (), i32, _ > >
// ::new( ( | storage : Struct1FormerStorage, _context | storage.int_1.unwrap()*2 ).into() )
// .int_1( 13 )
// .form();
// // a_id!( got, 26 );
// custom params begin with Struct1FormerWithClosure
let got = Struct1Former
::< Struct1FormerWithClosure< i32, i32 > >
::begin
(
None,
Some( 3 ),
| storage : Struct1FormerStorage, context : Option< i32 > | { 2 * ( storage.int_1.unwrap() + context.unwrap() ) }
)
.int_1( 13 )
.form();
a_id!( got, 32 );

}

Expand Down

0 comments on commit af08892

Please sign in to comment.