I want to convert the [u8; 2] back to u16.

I found this isn't simply a u16::from_be_bytes or u16::from_le_bytes.

1 Answer 1



It's impossible.

The information was lost in this algorithm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.