1
Fork 0

std::vec: add a sugary .sort() method for plain Ord sorting.

This moves the custom sorting to `.sort_by`.
This commit is contained in:
Huon Wilson 2013-12-19 23:03:11 +11:00
parent 48fedcb36f
commit 1b1e4caa79
16 changed files with 91 additions and 27 deletions

View file

@ -935,7 +935,7 @@ fn item_module(w: &mut Writer, cx: &Context,
}
debug!("{:?}", indices);
indices.sort(|&i1, &i2| le(&items[i1], &items[i2], i1, i2));
indices.sort_by(|&i1, &i2| le(&items[i1], &items[i2], i1, i2));
debug!("{:?}", indices);
let mut curty = "";