Find the Missing Number

You are given a list of n-1 integers and these integers are in the range of 1 to n. There are no duplicates in the list. One of the integers is missing in the list. Write an efficient code to find the missing integer.

Examples

let v = vec![1, 2, 4, 6, 3, 7, 8];
assert_eq!(find_missing_number(&v), 5);