Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't build example with nickel.rs 0.9 #4

Open
cnd opened this issue Nov 29, 2016 · 0 comments
Open

can't build example with nickel.rs 0.9 #4

cnd opened this issue Nov 29, 2016 · 0 comments

Comments

@cnd
Copy link

cnd commented Nov 29, 2016

    router.get("/", middleware! { |req, mut response|
      let mut data = HashMap::new();
      let cook = format!("{:?}", CookieSession::get_mut(req, &mut response));
error[E0308]: mismatched types
  --> src/handler.rs:24:57
   |
24 |       let cook = format!("{:?}", CookieSession::get_mut(req, &mut response));
   |                                                         ^^^ expected struct `nickel::request::Request`, found struct `nickel::Request`
   |
   = note: expected type `&mut nickel::request::Request<'_, '_, _>`
   = note:    found type `&'r mut nickel::Request<'mw, 'conn, _>`

error[E0308]: mismatched types
  --> src/handler.rs:24:62
   |
24 |       let cook = format!("{:?}", CookieSession::get_mut(req, &mut response));
   |                                                              ^^^^^^^^^^^^^ expected struct `nickel::response::Response`, found struct `nickel::Response`
   |
   = note: expected type `&mut nickel::response::Response<'_, _>`
   = note:    found type `&mut nickel::Response<'mw, _>`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant