aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/util/vec.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/util/vec.rs')
-rw-r--r--src/components/util/vec.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/util/vec.rs b/src/components/util/vec.rs
index 2c525c701cc..2fabf8455ef 100644
--- a/src/components/util/vec.rs
+++ b/src/components/util/vec.rs
@@ -22,14 +22,14 @@ impl<'a, T: Ord + Eq> BinarySearchMethods<'a, T> for &'a [T] {
let mut low : int = 0;
let mut high : int = (self.len() as int) - 1;
- while (low <= high) {
+ while low <= high {
// http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html
let mid : int = (((low as uint) + (high as uint)) >> 1) as int;
let midv = &self[mid];
- if (midv < key) {
+ if midv < key {
low = mid + 1;
- } else if (midv > key) {
+ } else if midv > key {
high = mid - 1;
} else {
return Some(mid as uint);