Don’t track the state.bin file.
This commit is contained in:
committed by
Sébastien Crozet
parent
c8a2c0379e
commit
34b0d51455
@@ -18,7 +18,17 @@ pub fn init_world(testbed: &mut Testbed) {
|
||||
/*
|
||||
* Set up the testbed.
|
||||
*/
|
||||
let bytes = std::fs::read("state.bin").unwrap();
|
||||
let path = "state.bin";
|
||||
let bytes = match std::fs::read(path) {
|
||||
Ok(bytes) => bytes,
|
||||
Err(err) => {
|
||||
println!(
|
||||
"Failed to open the serialzed scene file {:?}: {}",
|
||||
path, err
|
||||
);
|
||||
return;
|
||||
}
|
||||
};
|
||||
match bincode::deserialize(&bytes) {
|
||||
Ok(state) => {
|
||||
let state: PhysicsState = state;
|
||||
|
||||
Reference in New Issue
Block a user