stop error
This commit is contained in:
parent
3e737282dc
commit
40e7717aec
46
src/bot.rs
46
src/bot.rs
@ -41,24 +41,24 @@ mod simulation{
|
|||||||
#[brw(little)]
|
#[brw(little)]
|
||||||
pub struct Instruction{}
|
pub struct Instruction{}
|
||||||
}
|
}
|
||||||
mod instruction{
|
// mod instruction{
|
||||||
#[super::binrw]
|
// #[super::binrw]
|
||||||
#[brw(little)]
|
// #[brw(little)]
|
||||||
pub struct TimedInstruction<Instruction:binrw::BinRead+binrw::BinWrite>{
|
// pub struct TimedInstruction<Instruction:binrw::BinRead+binrw::BinWrite>{
|
||||||
time:u64,
|
// time:u64,
|
||||||
instruction:Instruction
|
// instruction:Instruction
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
mod timeline{
|
// mod timeline{
|
||||||
#[super::binrw]
|
// #[super::binrw]
|
||||||
#[brw(little)]
|
// #[brw(little)]
|
||||||
pub struct Timeline<Instruction:binrw::BinRead+binrw::BinWrite>{
|
// pub struct Timeline<Instruction:binrw::BinRead+binrw::BinWrite>{
|
||||||
#[bw(try_calc(u32::try_from(instructions.len())))]
|
// #[bw(try_calc(u32::try_from(instructions.len())))]
|
||||||
instruction_count:u32,
|
// instruction_count:u32,
|
||||||
#[br(count=instruction_count)]
|
// #[br(count=instruction_count)]
|
||||||
instructions:Vec<super::instruction::TimedInstruction<Instruction>>
|
// instructions:Vec<super::instruction::TimedInstruction<Instruction>>
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//serious code
|
//serious code
|
||||||
|
|
||||||
@ -70,15 +70,15 @@ struct SegmentId(u64);
|
|||||||
#[brw(little)]
|
#[brw(little)]
|
||||||
pub struct Segment{
|
pub struct Segment{
|
||||||
state:simulation::State,
|
state:simulation::State,
|
||||||
#[bw(try_calc(u32::try_from(instructions.len())))]
|
//#[bw(try_calc(u32::try_from(instructions.len())))]
|
||||||
instruction_count:u32,
|
//instruction_count:u32,
|
||||||
#[br(count=instruction_count)]
|
//#[br(count=instruction_count)]
|
||||||
instructions:Vec<instruction::TimedInstruction<simulation::Instruction>>
|
//instructions:Vec<instruction::TimedInstruction<simulation::Instruction>>
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct StreamableBot<R:BinReaderExt>{
|
pub struct StreamableBot<R:BinReaderExt>{
|
||||||
file:crate::file::File<R>,
|
file:crate::file::File<R>,
|
||||||
timeline:timeline::Timeline<SegmentId>,
|
//timeline:timeline::Timeline<SegmentId>,
|
||||||
segment_id_to_block_id:Vec<crate::file::BlockId>,
|
segment_id_to_block_id:Vec<crate::file::BlockId>,
|
||||||
}
|
}
|
||||||
impl<R:BinReaderExt> StreamableBot<R>{
|
impl<R:BinReaderExt> StreamableBot<R>{
|
||||||
|
Loading…
Reference in New Issue
Block a user