Skip to content

Commit 0cedc7a

Browse files
committed
Update to rust master
1 parent 27827d8 commit 0cedc7a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "MIT"
55
repository = "https://github.com/conduit-rust/route-recognizer.rs"
66
keywords = ["router", "url"]
77

8-
version = "0.1.3"
8+
version = "0.1.4"
99
authors = ["wycats"]

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use nfa::NFA;
44
use nfa::CharacterClass;
5-
use std::collections::TreeMap;
5+
use std::collections::BTreeMap;
66

77
pub mod nfa;
88

@@ -56,20 +56,20 @@ impl Eq for Metadata {}
5656

5757
#[deriving(PartialEq, Clone, Show)]
5858
pub struct Params {
59-
map: TreeMap<String, String>
59+
map: BTreeMap<String, String>
6060
}
6161

6262
impl Params {
6363
pub fn new() -> Params {
64-
Params{ map: TreeMap::new() }
64+
Params{ map: BTreeMap::new() }
6565
}
6666

6767
pub fn insert(&mut self, key: String, value: String) {
6868
self.map.insert(key, value);
6969
}
7070

7171
pub fn find<'a>(&'a self, key: &str) -> Option<&'a str> {
72-
self.map.find_with(|k| key.cmp(k.as_slice())).map(|s| s.as_slice())
72+
self.map.get(key).map(|s| s.as_slice())
7373
}
7474
}
7575

@@ -96,12 +96,12 @@ impl<T> Match<T> {
9696
#[deriving(Clone)]
9797
pub struct Router<T> {
9898
nfa: NFA<Metadata>,
99-
handlers: TreeMap<uint, T>
99+
handlers: BTreeMap<uint, T>
100100
}
101101

102102
impl<T> Router<T> {
103103
pub fn new() -> Router<T> {
104-
Router{ nfa: NFA::new(), handlers: TreeMap::new() }
104+
Router{ nfa: NFA::new(), handlers: BTreeMap::new() }
105105
}
106106

107107
pub fn add(&mut self, mut route: &str, dest: T) {

0 commit comments

Comments
 (0)