update example
This commit is contained in:
parent
5177061ae5
commit
942e5ee1d8
@ -9,6 +9,11 @@ use strafesnet_roblox_bot_file::{File,TimedBlockId};
|
||||
let file=std::fs::File::open("bot_file")?;
|
||||
let input=std::io::BufReader::new(file);
|
||||
let mut bot_file=File::new(input)?;
|
||||
|
||||
// read the whole file
|
||||
let block=bot_file.read_all()?;
|
||||
|
||||
// or do data streaming block by block
|
||||
for &TimedBlockId{time,block_id} in &bot_file.header.offline_blocks_timeline{
|
||||
// header is immutably borrowed
|
||||
// while data is mutably borrowed
|
||||
|
Loading…
x
Reference in New Issue
Block a user