You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get the actix example working in it's own new project.
But I get the following error:
no method named as_ref found for type mime_guess::Mime in the current scope
src/main.rs:22:61
$ cargo build
Compiling embed_actix v0.1.0 (/home/rj/src/embed_actix)
error[E0599]: no method named `as_ref` found for type `mime_guess::Mime` in the current scope
--> src/main.rs:22:61
|
22 | HttpResponse::Ok().content_type(guess_mime_type(path).as_ref()).body(body)`
| ^^^^^
Found the problem - I was using a stable version of mime_guess, when I should have been using the latest alpha version. So my cargo.toml file looks like this (main.rs (copy of examples/actix.rs) is untouched):
Hi,
I'm trying to get the actix example working in it's own new project.
But I get the following error:
no method named
as_ref
found for typemime_guess::Mime
in the current scopesrc/main.rs:22:61
cargo.toml:
src/main.rs is copy of (with no changes):
examples/actix.rs
Mime is defined as
so should have the as_ref trait?
Any help to get this working would be great - thanks!
The text was updated successfully, but these errors were encountered: