interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / vendor / const-oid / src / checked.rs

11 lines · 264 bytes Raw Blame History
1//! Checked arithmetic helpers.
2
3/// `const fn`-friendly checked addition helper.
4macro_rules! checked_add {
5 ($a:expr, $b:expr) => {
6 match $a.checked_add($b) {
7 Some(n) => n,
8 None => return Err(Error::Length),
9 }
10 };
11}