Open
Description
Compiling my project results in a bunch of warnings:
warning: code relies on type inference rules which are likely to change
--> src/main.rs:83:21
|
83 | server.get("/", middleware! { |_, res|
| _____________________^ starting here...
84 | | let mut data = HashMap::new();
85 | | data.insert("name", "user");
86 | | return res.render("templates/index.html", &data);
87 | | });
| |_____^ ...ending here
|
= note: #[warn(resolve_trait_on_defaulted_unit)] on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #39216 <https://github.com/rust-lang/rust/issues/39216>
= note: this error originates in a macro outside of the current crate
warning: unreachable expression
--> src/main.rs:83:39
|
83 | server.get("/", middleware! { |_, res|
| ^^^
|
= note: #[warn(unreachable_code)] on by default
warning: code relies on type inference rules which are likely to change
--> src/main.rs:89:28
|
89 | server.get("/e/:hash", middleware! { |req, res|
| ____________________________^ starting here...
90 | | let hash = req.param("hash").unwrap();
91 | |
92 | | let mut data = HashMap::new();
93 | | data.insert("hash", hash);
94 | | return res.render("templates/view.html", &data);
95 | | });
| |_____^ ...ending here
|
= note: #[warn(resolve_trait_on_defaulted_unit)] on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #39216 <https://github.com/rust-lang/rust/issues/39216>
= note: this error originates in a macro outside of the current crate
warning: unreachable expression
--> src/main.rs:89:48
|
89 | server.get("/e/:hash", middleware! { |req, res|
| ^^^
|
= note: #[warn(unreachable_code)] on by default
This happens with router!
as well. My code is very similar to the examples on http://nickel.rs, I'm not sure if I'm doing something wrong.