make rand code use slices

This commit is contained in:
Niko Matsakis
2012-08-27 19:55:18 -07:00
parent 0a01d82f6f
commit 206edf66c9
2 changed files with 14 additions and 14 deletions

View File

@@ -1086,7 +1086,7 @@ pure fn zip<T, U>(+v: ~[const T], +u: ~[const U]) -> ~[(T, U)] {
* * a - The index of the first element
* * b - The index of the second element
*/
fn swap<T>(&&v: ~[mut T], a: uint, b: uint) {
fn swap<T>(v: &[mut T], a: uint, b: uint) {
v[a] <-> v[b];
}