Compare commits
2 Commits
dbe59159e1
...
ee769f043f
Author | SHA1 | Date | |
---|---|---|---|
ee769f043f | |||
926b265f91 |
8
central_backend/Cargo.lock
generated
8
central_backend/Cargo.lock
generated
@ -495,9 +495,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "asn1"
|
name = "asn1"
|
||||||
version = "0.21.1"
|
version = "0.21.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "33fb74ca1da7780ced4ef36df6ea620b4e1debeff2b1ccde057583771e405e78"
|
checksum = "2d9c3502a6f1b50a2c69b97b71638a81ad3b21b9874604880401b9b2b0bf758f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"asn1_derive",
|
"asn1_derive",
|
||||||
"itoa",
|
"itoa",
|
||||||
@ -505,9 +505,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "asn1_derive"
|
name = "asn1_derive"
|
||||||
version = "0.21.1"
|
version = "0.21.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0aa21886d7595227bbe0a5d53598aa295ef5f0d093936e2e76d4239d6d14ef22"
|
checksum = "1766ebcb519d8dd186d60dfa912571edcaa2c1f995e2e56643a261a87df69a61"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -15,7 +15,7 @@ openssl = { version = "0.10.72" }
|
|||||||
openssl-sys = "0.9.108"
|
openssl-sys = "0.9.108"
|
||||||
libc = "0.2.172"
|
libc = "0.2.172"
|
||||||
foreign-types-shared = "0.1.1"
|
foreign-types-shared = "0.1.1"
|
||||||
asn1 = "0.21.1"
|
asn1 = "0.21.3"
|
||||||
actix-web = { version = "4.10.2", features = ["openssl"] }
|
actix-web = { version = "4.10.2", features = ["openssl"] }
|
||||||
futures = "0.3.31"
|
futures = "0.3.31"
|
||||||
serde = { version = "1.0.219", features = ["derive"] }
|
serde = { version = "1.0.219", features = ["derive"] }
|
||||||
|
@ -3,7 +3,6 @@ use actix_web::body::BoxBody;
|
|||||||
use actix_web::http::StatusCode;
|
use actix_web::http::StatusCode;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fmt::{Display, Formatter};
|
use std::fmt::{Display, Formatter};
|
||||||
use std::io::ErrorKind;
|
|
||||||
use zip::result::ZipError;
|
use zip::result::ZipError;
|
||||||
|
|
||||||
/// Custom error to ease controller writing
|
/// Custom error to ease controller writing
|
||||||
@ -52,7 +51,7 @@ impl From<serde_json::Error> for HttpErr {
|
|||||||
|
|
||||||
impl From<Box<dyn Error>> for HttpErr {
|
impl From<Box<dyn Error>> for HttpErr {
|
||||||
fn from(value: Box<dyn Error>) -> Self {
|
fn from(value: Box<dyn Error>) -> Self {
|
||||||
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
|
HttpErr::Err(std::io::Error::other(value.to_string()).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,43 +81,43 @@ impl From<reqwest::header::ToStrError> for HttpErr {
|
|||||||
|
|
||||||
impl From<actix_web::Error> for HttpErr {
|
impl From<actix_web::Error> for HttpErr {
|
||||||
fn from(value: actix_web::Error) -> Self {
|
fn from(value: actix_web::Error) -> Self {
|
||||||
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
|
HttpErr::Err(std::io::Error::other(value.to_string()).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<actix::MailboxError> for HttpErr {
|
impl From<actix::MailboxError> for HttpErr {
|
||||||
fn from(value: actix::MailboxError) -> Self {
|
fn from(value: actix::MailboxError) -> Self {
|
||||||
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
|
HttpErr::Err(std::io::Error::other(value.to_string()).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<actix_identity::error::GetIdentityError> for HttpErr {
|
impl From<actix_identity::error::GetIdentityError> for HttpErr {
|
||||||
fn from(value: actix_identity::error::GetIdentityError) -> Self {
|
fn from(value: actix_identity::error::GetIdentityError) -> Self {
|
||||||
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
|
HttpErr::Err(std::io::Error::other(value.to_string()).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<actix_identity::error::LoginError> for HttpErr {
|
impl From<actix_identity::error::LoginError> for HttpErr {
|
||||||
fn from(value: actix_identity::error::LoginError) -> Self {
|
fn from(value: actix_identity::error::LoginError) -> Self {
|
||||||
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
|
HttpErr::Err(std::io::Error::other(value.to_string()).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<openssl::error::ErrorStack> for HttpErr {
|
impl From<openssl::error::ErrorStack> for HttpErr {
|
||||||
fn from(value: openssl::error::ErrorStack) -> Self {
|
fn from(value: openssl::error::ErrorStack) -> Self {
|
||||||
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
|
HttpErr::Err(std::io::Error::other(value.to_string()).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<ZipError> for HttpErr {
|
impl From<ZipError> for HttpErr {
|
||||||
fn from(value: ZipError) -> Self {
|
fn from(value: ZipError) -> Self {
|
||||||
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
|
HttpErr::Err(std::io::Error::other(value.to_string()).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<walkdir::Error> for HttpErr {
|
impl From<walkdir::Error> for HttpErr {
|
||||||
fn from(value: walkdir::Error) -> Self {
|
fn from(value: walkdir::Error) -> Self {
|
||||||
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
|
HttpErr::Err(std::io::Error::other(value.to_string()).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user