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)]
|
||||
pub struct Instruction{}
|
||||
}
|
||||
mod instruction{
|
||||
#[super::binrw]
|
||||
#[brw(little)]
|
||||
pub struct TimedInstruction<Instruction:binrw::BinRead+binrw::BinWrite>{
|
||||
time:u64,
|
||||
instruction:Instruction
|
||||
}
|
||||
}
|
||||
mod timeline{
|
||||
#[super::binrw]
|
||||
#[brw(little)]
|
||||
pub struct Timeline<Instruction:binrw::BinRead+binrw::BinWrite>{
|
||||
#[bw(try_calc(u32::try_from(instructions.len())))]
|
||||
instruction_count:u32,
|
||||
#[br(count=instruction_count)]
|
||||
instructions:Vec<super::instruction::TimedInstruction<Instruction>>
|
||||
}
|
||||
}
|
||||
// mod instruction{
|
||||
// #[super::binrw]
|
||||
// #[brw(little)]
|
||||
// pub struct TimedInstruction<Instruction:binrw::BinRead+binrw::BinWrite>{
|
||||
// time:u64,
|
||||
// instruction:Instruction
|
||||
// }
|
||||
// }
|
||||
// mod timeline{
|
||||
// #[super::binrw]
|
||||
// #[brw(little)]
|
||||
// pub struct Timeline<Instruction:binrw::BinRead+binrw::BinWrite>{
|
||||
// #[bw(try_calc(u32::try_from(instructions.len())))]
|
||||
// instruction_count:u32,
|
||||
// #[br(count=instruction_count)]
|
||||
// instructions:Vec<super::instruction::TimedInstruction<Instruction>>
|
||||
// }
|
||||
// }
|
||||
|
||||
//serious code
|
||||
|
||||
@ -70,15 +70,15 @@ struct SegmentId(u64);
|
||||
#[brw(little)]
|
||||
pub struct Segment{
|
||||
state:simulation::State,
|
||||
#[bw(try_calc(u32::try_from(instructions.len())))]
|
||||
instruction_count:u32,
|
||||
#[br(count=instruction_count)]
|
||||
instructions:Vec<instruction::TimedInstruction<simulation::Instruction>>
|
||||
//#[bw(try_calc(u32::try_from(instructions.len())))]
|
||||
//instruction_count:u32,
|
||||
//#[br(count=instruction_count)]
|
||||
//instructions:Vec<instruction::TimedInstruction<simulation::Instruction>>
|
||||
}
|
||||
|
||||
pub struct StreamableBot<R:BinReaderExt>{
|
||||
file:crate::file::File<R>,
|
||||
timeline:timeline::Timeline<SegmentId>,
|
||||
//timeline:timeline::Timeline<SegmentId>,
|
||||
segment_id_to_block_id:Vec<crate::file::BlockId>,
|
||||
}
|
||||
impl<R:BinReaderExt> StreamableBot<R>{
|
||||
|
Loading…
Reference in New Issue
Block a user