zero-indexed Ids
This commit is contained in:
12
src/v1.rs
12
src/v1.rs
@@ -606,19 +606,11 @@ impl std::error::Error for Error{}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone,Copy)]
|
||||
pub struct BlockId(
|
||||
#[br(map=|i:u32|i-1)]
|
||||
#[bw(map=|&i:&u32|i+1)]
|
||||
u32
|
||||
);
|
||||
pub struct BlockId(u32);
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
struct BlockPosition(
|
||||
#[br(map=|i:u32|i-1)]
|
||||
#[bw(map=|&i:&u32|i+1)]
|
||||
u32
|
||||
);
|
||||
struct BlockPosition(u32);
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct InvalidBlockId(pub BlockId);
|
||||
|
||||
Reference in New Issue
Block a user