Skip to content

Commit fd7632b

Browse files
committed
basic-router: Update.
1 parent 7f7597a commit fd7632b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

basic-router/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
name = "basic-router"
33
version = "0.1.0"
44
authors = ["You <[email protected]>"]
5+
edition = "2018"
56

67
[dependencies]

basic-router/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct Response {
1515
body: Vec<u8>
1616
}
1717

18-
type BoxedCallback = Box<Fn(&Request) -> Response>;
18+
type BoxedCallback = Box<dyn Fn(&Request) -> Response>;
1919

2020
struct BasicRouter {
2121
routes: HashMap<String, BoxedCallback>
@@ -35,6 +35,7 @@ impl BasicRouter {
3535
}
3636
}
3737

38+
3839
impl BasicRouter {
3940
fn handle_request(&self, request: &Request) -> Response {
4041
match self.routes.get(&request.url) {

0 commit comments

Comments
 (0)