diff --git a/src/math_app.rs b/src/math_app.rs index 5bd2b0a..6af22d6 100644 --- a/src/math_app.rs +++ b/src/math_app.rs @@ -190,7 +190,7 @@ impl MathApp { if commit == build::SHORT_COMMIT { tracing::info!("Reading previous function data"); - let function_manager: FunctionManager = unsafe { bincode::deserialize(&func_data).unwrap_unchecked() }; + let function_manager: FunctionManager = bincode::deserialize(&func_data).ok()?; return Some(function_manager); } else { tracing::info!("Previous functions are invalid due to differing commits (build: {}, previous: {})", build::SHORT_COMMIT, commit);