mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
refactor: use graduated Html responder
This commit is contained in:
@ -8,7 +8,6 @@ use actix_web::{
|
||||
middleware::{self, ErrorHandlerResponse, ErrorHandlers},
|
||||
web, App, Error, HttpResponse, HttpServer, Responder, Result,
|
||||
};
|
||||
use actix_web_lab::respond::Html;
|
||||
use tera::Tera;
|
||||
|
||||
// store tera template in application state
|
||||
@ -28,7 +27,7 @@ async fn index(
|
||||
.map_err(|_| error::ErrorInternalServerError("Template error"))?
|
||||
};
|
||||
|
||||
Ok(Html(s))
|
||||
Ok(web::Html::new(s))
|
||||
}
|
||||
|
||||
#[actix_web::main]
|
||||
|
Reference in New Issue
Block a user