diff --git a/examples3d/debug_deserialize3.rs b/examples3d/debug_deserialize3.rs index 6de4c76..b8b79fb 100644 --- a/examples3d/debug_deserialize3.rs +++ b/examples3d/debug_deserialize3.rs @@ -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; diff --git a/state.bin b/state.bin deleted file mode 100644 index beb406a..0000000 Binary files a/state.bin and /dev/null differ