mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-06-07 06:36:42 +00:00
fix clippy lints
This commit is contained in:
parent
2b10aa5d40
commit
032f6040b8
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
use actix_web::body::Body;
|
use actix_web::body::AnyBody;
|
||||||
use actix_web::{http::header, web, HttpResponse, Responder};
|
use actix_web::{http::header, web, HttpResponse, Responder};
|
||||||
use mime_guess::from_path;
|
use mime_guess::from_path;
|
||||||
use rust_embed::RustEmbed;
|
use rust_embed::RustEmbed;
|
||||||
@ -54,7 +54,7 @@ struct Asset;
|
|||||||
pub fn handle_embedded_file(path: &str) -> HttpResponse {
|
pub fn handle_embedded_file(path: &str) -> HttpResponse {
|
||||||
match Asset::get(path) {
|
match Asset::get(path) {
|
||||||
Some(content) => {
|
Some(content) => {
|
||||||
let body: Body = match content.data {
|
let body: AnyBody = match content.data {
|
||||||
Cow::Borrowed(bytes) => bytes.into(),
|
Cow::Borrowed(bytes) => bytes.into(),
|
||||||
Cow::Owned(bytes) => bytes.into(),
|
Cow::Owned(bytes) => bytes.into(),
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
use actix_web::body::Body;
|
use actix_web::body::AnyBody;
|
||||||
use actix_web::{get, http::header, web, HttpResponse, Responder};
|
use actix_web::{get, http::header, web, HttpResponse, Responder};
|
||||||
use log::debug;
|
use log::debug;
|
||||||
use mime_guess::from_path;
|
use mime_guess::from_path;
|
||||||
@ -82,7 +82,7 @@ struct Asset;
|
|||||||
fn handle_assets(path: &str) -> HttpResponse {
|
fn handle_assets(path: &str) -> HttpResponse {
|
||||||
match Asset::get(path) {
|
match Asset::get(path) {
|
||||||
Some(content) => {
|
Some(content) => {
|
||||||
let body: Body = match content.data {
|
let body: AnyBody = match content.data {
|
||||||
Cow::Borrowed(bytes) => bytes.into(),
|
Cow::Borrowed(bytes) => bytes.into(),
|
||||||
Cow::Owned(bytes) => bytes.into(),
|
Cow::Owned(bytes) => bytes.into(),
|
||||||
};
|
};
|
||||||
@ -112,7 +112,7 @@ struct Favicons;
|
|||||||
fn handle_favicons(path: &str) -> HttpResponse {
|
fn handle_favicons(path: &str) -> HttpResponse {
|
||||||
match Favicons::get(path) {
|
match Favicons::get(path) {
|
||||||
Some(content) => {
|
Some(content) => {
|
||||||
let body: Body = match content.data {
|
let body: AnyBody = match content.data {
|
||||||
Cow::Borrowed(bytes) => bytes.into(),
|
Cow::Borrowed(bytes) => bytes.into(),
|
||||||
Cow::Owned(bytes) => bytes.into(),
|
Cow::Owned(bytes) => bytes.into(),
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user