From ce28204e1f2911f6c502636e49384178ae1f4baf Mon Sep 17 00:00:00 2001 From: wandalen Date: Sat, 20 Apr 2024 20:49:41 +0300 Subject: [PATCH] former : evolve --- .../tests/inc/former_tests/subformer_basic.rs | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/module/core/former/tests/inc/former_tests/subformer_basic.rs b/module/core/former/tests/inc/former_tests/subformer_basic.rs index 40980e35b4..bd837d5a5b 100644 --- a/module/core/former/tests/inc/former_tests/subformer_basic.rs +++ b/module/core/former/tests/inc/former_tests/subformer_basic.rs @@ -34,7 +34,7 @@ pub struct Property< Name > impl< Name > Property< Name > { #[ inline ] - pub fn new_coercing< Description, Code >( name : Name, description : Description, code : Code ) -> Self + pub fn new< Description, Code >( name : Name, description : Description, code : Code ) -> Self where Name : core::convert::Into< Name >, Description : core::convert::Into< String >, @@ -295,7 +295,7 @@ where ( None, Some( self ), - ContainerAddElement::new_coercing(), + ContainerAddElement::default(), ); former.name( name ) @@ -427,23 +427,15 @@ where // +#[ derive( Debug ) ] pub struct ContainerAddElement< SuperContainer, Element, SubFormed > ( core::marker::PhantomData< fn( SuperContainer, Element, SubFormed ) > ); -impl -< - SuperContainer, - Element, - SubFormed, -> -ContainerAddElement -< - SuperContainer, - Element, - SubFormed, -> +impl< SuperContainer, Element, SubFormed > ::core::default::Default +for ContainerAddElement< SuperContainer, Element, SubFormed > { - pub fn new_coercing() -> Self + #[ inline( always ) ] + fn default() -> Self { Self( core::marker::PhantomData ) }