Add Default as a required trait

I could make KStruct require `fn new`, but what I really want already exists.
This commit is contained in:
Bradlee Speice 2019-04-29 14:05:03 -04:00
parent 01d42890f6
commit 4b6e5181b2

View File

@ -14,7 +14,7 @@ pub enum KError<'a> {
} }
pub type KResult<'a, T> = Result<T, KError<'a>>; pub type KResult<'a, T> = Result<T, KError<'a>>;
pub trait KStruct<'a> { pub trait KStruct<'a>: Default {
type Parent: KStruct<'a>; type Parent: KStruct<'a>;
type Root: KStruct<'a>; type Root: KStruct<'a>;