Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub fn foo<T>(v: &mut Vec<String>) {
- let n = v.len();
- for i in 0..n/2 {
- let x: String = v[i].clone();
- v[i] = v[n-i-1].clone();
- v[n-i-1] = x;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement