iron / staticfile

Static file-serving middleware for the Iron web framework.
MIT License
63 stars 56 forks source link

Not working with iron 0.6 #103

Open AlbertoElias opened 6 years ago

AlbertoElias commented 6 years ago

I recently updated to iron 0.6, so I updated mount to 0.4 and staticfile to 0.5, and now it won't compile with the following error:

the trait for<'r, 'r, 'r> std::ops::Fn<(&'r mut iron::Request<'r, 'r>,)> is not implemented for staticfile::Static required because of the requirements on the impl of iron::Handler for staticfile::Static

on this line:

mount.mount(prefix, Static::new(Path::new(path)));

zgtm commented 5 years ago

Have you tried a cargo update to see whether you had some old crates lying around?

Can you provide a minimal example? staticfile seems to work fine for me with iron 0.6. Maybe the problem only occurs in combination with mount?

dvberkel commented 4 years ago

I had a similar problem and cargo update suggestion worked for me