Skip to content

Commit

Permalink
former : types problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandalen committed May 7, 2024
1 parent 5e662cb commit aa2bb8c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 5 additions & 4 deletions module/core/former/examples/former_custom_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ fn main()
// = define custom container

// Custom container that logs additions
#[derive(Default)]
pub struct LoggingSet<T>
#[ derive( Default ) ]
pub struct LoggingSet< T >
{
set: HashSet<T>,
set : HashSet< T >,
}

// // Implementing the container traits for LoggingSet
Expand All @@ -33,7 +33,8 @@ fn main()
// }

// This trait allows adding entries to the LoggingSet
impl<T: Eq + std::hash::Hash + fmt::Debug> former::ContainerAdd for LoggingSet<T>
impl< T : Eq + std::hash::Hash + fmt::Debug > former::ContainerAdd
for LoggingSet< T >
{
fn add(&mut self, e: Self::Entry) -> bool
{
Expand Down
12 changes: 6 additions & 6 deletions module/core/former/tests/inc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ mod former_tests

#[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
mod parametrized_struct_manual;
// #[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
// mod parametrized_struct_imm;
// #[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
// mod parametrized_struct_where;
// mod parametrized_field;
// mod parametrized_field_where;
#[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
mod parametrized_struct_imm;
#[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
mod parametrized_struct_where;
mod parametrized_field;
mod parametrized_field_where;

// #[ cfg( any( not( feature = "no_std" ), feature = "use_alloc" ) ) ]
// mod subformer_basic;
Expand Down
6 changes: 4 additions & 2 deletions module/core/former_meta/src/derive_former/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,8 @@ where
#subformer_definition : former::FormerDefinition
<
Storage : former::ContainerAdd< Entry = < #typ as former::Container >::Entry >,
Context = Struct1Former< Definition >,
Context = #former< #former_generics_ty >,
// Context = Struct1Former< Definition >,
End = #former_assign_end < Definition >,
>,
{
Expand Down Expand Up @@ -771,7 +772,8 @@ where
#subformer_definition : former::FormerDefinition
<
Storage : former::ContainerAdd< Entry = < #typ as former::Container >::Entry >,
Context = Struct1Former< Definition >,
Context = #former< #former_generics_ty >,
// Context = Struct1Former< Definition >,
End = #former_assign_end < Definition >,
>,
{
Expand Down

0 comments on commit aa2bb8c

Please sign in to comment.