mirror of
https://github.com/bspeice/kaitai_rust
synced 2024-11-21 21:38:09 -05:00
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:
parent
01d42890f6
commit
4b6e5181b2
@ -14,7 +14,7 @@ pub enum 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 Root: KStruct<'a>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user