The given example doesn't effectively show that in Rust, indices start from 0; it might even give the impression that indices begin at 1.
A common mistake is forgetting to subtract 1, as seen here:
Right: let i = xs.len() - 1;
Wrong: let i = xs.len();