Don’t track the state.bin file.

This commit is contained in:
Sébastien Crozet
2022-03-06 23:00:07 +01:00
committed by Sébastien Crozet
parent c8a2c0379e
commit 34b0d51455
2 changed files with 11 additions and 1 deletions

View File

@@ -18,7 +18,17 @@ pub fn init_world(testbed: &mut Testbed) {
/* /*
* Set up the 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) { match bincode::deserialize(&bytes) {
Ok(state) => { Ok(state) => {
let state: PhysicsState = state; let state: PhysicsState = state;

BIN
state.bin

Binary file not shown.