1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-07-29 11:18:30 +00:00

fix arithmetic side-effects

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-07-07 04:46:16 +00:00
parent 52a561ff9e
commit 7397064edd
25 changed files with 139 additions and 114 deletions

View file

@ -16,7 +16,15 @@ macro_rules! checked {
#[cfg(not(debug_assertions))]
#[macro_export]
macro_rules! validated {
($($input:tt)*) => { Ok($($input)*) }
($($input:tt)*) => {
//#[allow(clippy::arithmetic_side_effects)] {
//Some($($input)*)
// .ok_or_else(|| $crate::Error::Arithmetic("this error should never been seen"))
//}
//NOTE: remove me when stmt_expr_attributes is stable
$crate::checked!($($input)*)
}
}
#[cfg(debug_assertions)]