1
0
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:
Rob Ede
2024-07-07 00:23:03 +01:00
parent 10aff3cdb1
commit a67c7803e6
13 changed files with 27 additions and 40 deletions

View File

@ -1,7 +1,7 @@
use std::{io, sync::Arc};
use actix_web::{get, middleware::Logger, post, web, App, HttpResponse, HttpServer, Responder};
use actix_web_lab::{extract::Path, respond::Html};
use actix_web_lab::extract::Path;
mod broadcast;
use self::broadcast::Broadcaster;
@ -30,7 +30,7 @@ async fn main() -> io::Result<()> {
#[get("/")]
async fn index() -> impl Responder {
Html(include_str!("index.html").to_owned())
web::Html::new(include_str!("index.html").to_owned())
}
#[get("/events")]