Skip to content

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

@Cynede

Description

@Cynede
    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, _>`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions