From 6d38395077b070693a8339d1e3309638d2897db0 Mon Sep 17 00:00:00 2001 From: wandalen Date: Wed, 27 Mar 2024 00:56:12 +0200 Subject: [PATCH] experimenting --- module/core/former/src/hash_set.rs | 44 +++++++++++++++--------------- module/core/former/src/vector.rs | 12 +++----- 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/module/core/former/src/hash_set.rs b/module/core/former/src/hash_set.rs index e78d39b843..2c179181f3 100644 --- a/module/core/former/src/hash_set.rs +++ b/module/core/former/src/hash_set.rs @@ -84,24 +84,24 @@ // // } // // } // -// impl< K, Context, End > FormerDefinitionTypes -// for HashSetDefinition< K, Context, End > +// impl< K, Context, Formed > FormerDefinitionTypes +// for HashSetDefinition< K, Context, Formed > // where // K : ::core::cmp::Eq + ::core::hash::Hash, -// End : FormingEnd< Self >, +// // End : FormingEnd< Self >, // { // type Storage = HashSet< K >; -// type Formed = HashSet< K >; +// type Formed = Formed; // type Context = Context; // } // -// impl< K, Context, End > FormerDefinition -// for HashSetDefinition< K, Context, End > +// impl< K, Context, Formed, End > FormerDefinition +// for HashSetDefinition< K, Context, Formed, End > // where // K : ::core::cmp::Eq + ::core::hash::Hash, // End : FormingEnd< Self >, // { -// type Types = HashSetDefinition< K, Context, End >; +// type Types = HashSetDefinition< K, Context, Formed >; // type End = End; // } // @@ -144,22 +144,22 @@ // // // = extension // -// pub trait HashSetExt< K > : sealed::Sealed -// where -// K : ::core::cmp::Eq + ::core::hash::Hash, -// { -// fn former() -> HashSetSubformer< K, (), HashSet< K >, ReturnStorage >; -// } +// // pub trait HashSetExt< K > : sealed::Sealed +// // where +// // K : ::core::cmp::Eq + ::core::hash::Hash, +// // { +// // fn former() -> HashSetSubformer< K, (), HashSet< K >, ReturnStorage >; +// // } // -// impl< K > HashSetExt< K > for HashSet< K > -// where -// K : ::core::cmp::Eq + ::core::hash::Hash, -// { -// fn former() -> HashSetSubformer< K, (), HashSet< K >, ReturnStorage > -// { -// HashSetSubformer::< K, (), HashSet< K >, ReturnStorage >::new( ReturnStorage::default() ) -// } -// } +// // impl< K > HashSetExt< K > for HashSet< K > +// // where +// // K : ::core::cmp::Eq + ::core::hash::Hash, +// // { +// // fn former() -> HashSetSubformer< K, (), HashSet< K >, ReturnStorage > +// // { +// // HashSetSubformer::< K, (), HashSet< K >, ReturnStorage >::new( ReturnStorage::default() ) +// // } +// // } // // mod sealed // { diff --git a/module/core/former/src/vector.rs b/module/core/former/src/vector.rs index a7fdb2d276..9fb40007f1 100644 --- a/module/core/former/src/vector.rs +++ b/module/core/former/src/vector.rs @@ -44,20 +44,16 @@ for Vec< E > #[ derive( Debug, Default ) ] pub struct VectorDefinition< E, Context = (), Formed = Vec< E >, End = ReturnStorage > +// pub struct VectorDefinition< E, Context, Formed, End > { _phantom : core::marker::PhantomData< ( E, Context, Formed, End ) >, } -// impl< E, Context, Formed > VectorDefinition< E, Context, Formed > -// { -// pub fn new() -> Self -// { -// Self { _phantom : core::marker::PhantomData } -// } -// } - impl< E, Context, Formed > FormerDefinitionTypes for VectorDefinition< E, Context, Formed > +// for VectorDefinition< E, Context, Formed, End > +// where + // End : FormingEnd< Self >, { type Storage = Vec< E >; type Formed = Formed;