Skip to main content

try_decrement_cell_limit

Function try_decrement_cell_limit 

Source
fn try_decrement_cell_limit(val: &mut Option<NonZeroU32>) -> Result<(), ()>
Expand description

If val is Some(1), return Err(()); otherwise decrement it (if it is Some) and return Ok(()).