Skip to content

Commit

Permalink
fix former for all features
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandalen committed Mar 20, 2024
1 parent 372c785 commit f20ab8a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions module/core/former/src/axiomatic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ where
/// when it's called.
/// * `Context` - The type of the context that may be altered or returned by the closure.
/// This allows for flexible manipulation of context based on the container.
// #[ derive( Debug ) ]
#[ cfg( not( feature = "no_std" ) ) ]
pub struct ToSuperFormerWrapper< T, Context >
{
closure : Box< dyn Fn( T, Option< Context > ) -> Context >,
_marker : std::marker::PhantomData< T >,
}

#[ cfg( not( feature = "no_std" ) ) ]
impl< T, Context > ToSuperFormerWrapper< T, Context >
{
/// Constructs a new `ToSuperFormerWrapper` with the provided closure.
Expand All @@ -81,18 +82,21 @@ impl< T, Context > ToSuperFormerWrapper< T, Context >
}
}

#[ cfg( not( feature = "no_std" ) ) ]
use std::fmt;
#[ cfg( not( feature = "no_std" ) ) ]
impl< T, Context > fmt::Debug for ToSuperFormerWrapper< T, Context >
{
fn fmt( &self, f : &mut fmt::Formatter< '_ > ) -> fmt::Result
{
f.debug_struct( "ToSuperFormerWrapper" )
.field( "closure", &format_args!{ "< closure >" } )
.field( "closure", &format_args!{ "- closure -" } )
.field( "_marker", &self._marker )
.finish()
}
}

#[ cfg( not( feature = "no_std" ) ) ]
impl< T, Context > ToSuperFormer< T, Context >
for ToSuperFormerWrapper< T, Context >
{
Expand Down

0 comments on commit f20ab8a

Please sign in to comment.