diff --git a/src/docs.rs b/src/docs.rs index a74b3244..d318f3e8 100644 --- a/src/docs.rs +++ b/src/docs.rs @@ -16,7 +16,7 @@ */ use std::borrow::Cow; -use actix_web::body::Body; +use actix_web::body::AnyBody; use actix_web::{http::header, web, HttpResponse, Responder}; use mime_guess::from_path; use rust_embed::RustEmbed; @@ -54,7 +54,7 @@ struct Asset; pub fn handle_embedded_file(path: &str) -> HttpResponse { match Asset::get(path) { Some(content) => { - let body: Body = match content.data { + let body: AnyBody = match content.data { Cow::Borrowed(bytes) => bytes.into(), Cow::Owned(bytes) => bytes.into(), }; diff --git a/src/static_assets/static_files.rs b/src/static_assets/static_files.rs index d8f54b0d..66aac62a 100644 --- a/src/static_assets/static_files.rs +++ b/src/static_assets/static_files.rs @@ -16,7 +16,7 @@ */ use std::borrow::Cow; -use actix_web::body::Body; +use actix_web::body::AnyBody; use actix_web::{get, http::header, web, HttpResponse, Responder}; use log::debug; use mime_guess::from_path; @@ -82,7 +82,7 @@ struct Asset; fn handle_assets(path: &str) -> HttpResponse { match Asset::get(path) { Some(content) => { - let body: Body = match content.data { + let body: AnyBody = match content.data { Cow::Borrowed(bytes) => bytes.into(), Cow::Owned(bytes) => bytes.into(), }; @@ -112,7 +112,7 @@ struct Favicons; fn handle_favicons(path: &str) -> HttpResponse { match Favicons::get(path) { Some(content) => { - let body: Body = match content.data { + let body: AnyBody = match content.data { Cow::Borrowed(bytes) => bytes.into(), Cow::Owned(bytes) => bytes.into(), };