Module utils

Source
Expand description

Utility functions

Functionsยง

bytes_up_to
Const equivalent of &buffer[..upto] with saturating indexing.
flatten_panicvals
Flattens a &[&[PanicVal<'a>]] into a [PanicVal<'a>; LEN].
max_usize
Computes the maximum of l and r
min_usize
Computes the minimum of l and r
panicvals_id
For coercing a &[PanicVal<'_>; LEN] into a &[PanicVal<'_>].
slice_max_usize
Gets the maximum value in slice, returns 0 if the slice is empty.