Skip to content

Commit 45edb84

Browse files
committed
Update to rust master
1 parent 917a555 commit 45edb84

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "conduit-router"
4-
version = "0.5.2"
4+
version = "0.5.3"
55
authors = ["[email protected]"]
66
license = "MIT"
77
description = "Router middleware for conduit based on route-recognizer"

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ impl RouteBuilder {
3131
pub fn map<'a, H: Handler>(&'a mut self, method: Method, pattern: &str,
3232
handler: H) -> &'a mut RouteBuilder {
3333
{
34-
let router = match self.routers.entry(method) {
34+
let router = match self.routers.entry(&method) {
3535
Entry::Occupied(e) => e.into_mut(),
36-
Entry::Vacant(e) => e.set(Router::new()),
36+
Entry::Vacant(e) => e.insert(Router::new()),
3737
};
3838
router.add(pattern, box handler as Box<Handler + Send + Sync>);
3939
}

0 commit comments

Comments
 (0)