From 5e265cb54016454a1da304644bfc7e6715e6d6f0 Mon Sep 17 00:00:00 2001 From: stringhandler Date: Mon, 30 Jan 2023 13:25:36 +0200 Subject: [PATCH] fix: panic on overflow in release mode --- Cargo.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 399a5821c3..5d011e9624 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,9 +34,12 @@ members = [ # Add here until we move to edition=2021 resolver = "2" -# Shutdown when panicking so we can see the error, specifically for the wallet [profile.release] -panic = 'abort' +# Shutdown when panicking so we can see the error, specifically for the wallet +panic = "abort" +# By default, Rust will wrap an integer in release mode instead of throwing the overflow error +# seen in debug mode. Panicking at this time is better than silently using the wrong value. +overflow-checks = true [patch.crates-io] # Temporarily lock pgp to commit (master branch at time of writing) because the currently release crate locks zeroize to =1.3