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
warning: unused imports: `HttpResponse`, `web`
--> src/main.rs:2:28
|
2 | use actix_web::{get, http, web, App, HttpRequest, HttpResponse, HttpServer};
| ^^^ ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0277]: the trait bound `Cors: Transform<actix_web::app_service::AppRouting, ServiceRequest>` is not satisfied
--> src/main.rs:23:19
|
23 | .wrap(cors)
| ^^^^ the trait `Transform<actix_web::app_service::AppRouting, ServiceRequest>` is not implemented for `Cors`
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
error: could not compile `test_cors`
Your Environment
rustc -V
rustc 1.49.0 (e1884a8e3 2020-12-29)
Actix-* crate(s) Version:
[dependencies]
actix-web = { version = "4.0.0-beta.1", features = ["openssl"] }
toml = "0.5.8"
actix-service = "2.0.0-beta.3"
actix-cors = "0.5.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
json = "0.12.4"
The text was updated successfully, but these errors were encountered:
Current Behavior
code :
cargo run :
Your Environment
rustc -V
rustc 1.49.0 (e1884a8e3 2020-12-29)
Actix-* crate(s) Version:
The text was updated successfully, but these errors were encountered: