iron / router

Router middleware for the Iron web framework.
165 stars 74 forks source link

type mismatch on trait #137

Closed Thomspoon closed 7 years ago

Thomspoon commented 7 years ago

When running the example on the front page, I get this dastardly output from the compiler:

error[E0281]: type mismatch: the typefn(&mut iron::Request<', '>) -> std::result::Result<iron::Response, iron::IronError> {main::handler}implements the traitfor<'r, 'r, 'r> std::ops::Fn<(&'r mut iron::Request<'r, 'r>,)>, but the traitfor<'r, 'r, 'r> std::ops::Fn<(&'r mut iron::request::Request<'r, 'r>,)>is required (expected structiron::request::Request, found structiron::Request)

Could this be related to rustc's problems with higher-ranked trait bounds?

There shouldn't be a difference between iron::request::Request and iron::Request.

Thomspoon commented 7 years ago

Nope.

www.ironframework.io instructs you to use iron = "0.4.*"in your dependencies. Changing it to the updated "0.5.*" fixed this issue. Might need to update the version?