fn advance_key(mut bytes: Vec<u8>) -> Option<Vec<u8>> {
    while let Some(x) = bytes.last_mut() {
        if let Some(y) = x.checked_add(1) {
            *x = y;
            return Some(bytes);
        } else {
            bytes.pop();
        }
    }
    None
}
/// Returns a vector representing the key that is just **after** the one provided.
Returns a vector representing the key that is just **after** the one provided.
Returns a vector representing the key that is just ** after ** the one provided .
fn advance_key(mut bytes: Vec<u8>) -> Option<Vec<u8>> {
    while let Some(x) = bytes.last_mut() {
        if let Some(y) = x.checked_add(1) {
            *x = y;
            return Some(bytes);
        } else {
            bytes.pop();
        }
    }
    None
}
fn advance_key ( mut bytes : Vec < u8 > ) -> Option < Vec < u8 > > { while let Some ( x ) = bytes . last_mut ( ) { if let Some ( y ) = x . checked_add ( 1 ) { * x = y ; return Some ( bytes ) ; } else { bytes . pop ( ) ; } } None }
Returns a vector representing the key that is just **after** the one provided.
Returns a vector representing the key that is just ** after ** the one provided .
bytes
Vec<u8>
bytes
Vec<u8>