wrapping_add_signed

Function wrapping_add_signed 

Source
pub open spec fn wrapping_add_signed(x: u8, y: i8) -> u8
Expand description
{
    if x + y > <u8>::MAX {
        (x + y - 0x100) as u8
    } else if x + y < 0 {
        (x + y + 0x100) as u8
    } else {
        (x + y) as u8
    }
}