mirror of
https://github.com/actix/examples
synced 2025-06-28 18:00:37 +02:00
rename web::State to web::Data
This commit is contained in:
@ -7,7 +7,7 @@ use actix_web::{error, middleware, web, App, Error, HttpResponse, HttpServer};
|
||||
|
||||
// store tera template in application state
|
||||
fn index(
|
||||
tmpl: web::State<tera::Tera>,
|
||||
tmpl: web::Data<tera::Tera>,
|
||||
query: web::Query<HashMap<String, String>>,
|
||||
) -> Result<HttpResponse, Error> {
|
||||
let s = if let Some(name) = query.get("name") {
|
||||
|
Reference in New Issue
Block a user