fix clippy lints

This commit is contained in:
realaravinth 2021-12-03 13:41:24 +05:30
parent 2b10aa5d40
commit 032f6040b8
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88
2 changed files with 5 additions and 5 deletions

View file

@ -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(),
};

View file

@ -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(),
};