Guest User

Untitled

a guest
Jul 17th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. fn reverse(forward: &[u8]) -> Vec<u8> {
  2. forward.iter().cloned().rev().collect()
  3. }
  4.  
  5. fn main () {
  6. let input = [0, 1, 2, 3];
  7. let expected_output = [3, 2, 1, 0];
  8. assert_eq!(&reverse(&input), &expected_output)
  9. }
Add Comment
Please, Sign In to add comment