Skip to content
Permalink
Browse files

fix a bug in binary search

  • Loading branch information...
dfyz committed Feb 9, 2017
1 parent 08979f2 commit c3e07dfa80ef28b4b19920b4660398b9010fda29
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/geodata/reader.rs
@@ -151,7 +151,12 @@ impl<'a> Tags<'a> {
Ordering::Equal => return Some(mid_value.get_value().unwrap()),
}
}
None
let final_candidate = self.reader.get(lo);
if final_candidate.get_key().unwrap() == key {
Some(final_candidate.get_value().unwrap())
} else {
None
}
}

pub fn get(&self, index: u32) -> geodata_capnp::tag::Reader<'a> {

0 comments on commit c3e07df

Please sign in to comment.
You can’t perform that action at this time.