convenient impl
This commit is contained in:
parent
1f78c98c6f
commit
22543defa8
@ -2,12 +2,21 @@ use binrw::{binrw,BinReaderExt,io::TakeSeekExt};
|
||||
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Clone,Copy,Debug)]
|
||||
pub enum Bool{
|
||||
#[brw(magic=0u32)]
|
||||
False,
|
||||
#[brw(magic=1u32)]
|
||||
True,
|
||||
}
|
||||
impl Into<bool> for Bool{
|
||||
fn into(self)->bool{
|
||||
match self{
|
||||
Bool::False=>false,
|
||||
Bool::True=>true,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
pub struct Vector2{
|
||||
|
Loading…
x
Reference in New Issue
Block a user