build(deps): update dependencies (#4268)

This commit is contained in:
Sanchith Hegde
2024-04-02 15:43:30 +05:30
committed by GitHub
parent 9cce1520e3
commit 1f0d60e64f
46 changed files with 1980 additions and 1867 deletions

View File

@ -12,30 +12,6 @@ use crate::{errors as storage_errors, store::errors::DatabaseError};
pub type ApplicationResult<T> = Result<T, ApplicationError>;
macro_rules! impl_error_display {
($st: ident, $arg: tt) => {
impl Display for $st {
fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
fmt,
"{{ error_type: {:?}, error_description: {} }}",
self, $arg
)
}
}
};
}
macro_rules! impl_error_type {
($name: ident, $arg: tt) => {
#[derive(Debug)]
pub struct $name;
impl_error_display!($name, $arg);
impl std::error::Error for $name {}
};
}
#[derive(Debug, thiserror::Error)]
pub enum StorageError {
#[error("DatabaseError: {0:?}")]
@ -176,8 +152,6 @@ impl RedisErrorExt for error_stack::Report<RedisError> {
}
}
impl_error_type!(EncryptionError, "Encryption error");
#[derive(Debug, thiserror::Error)]
pub enum ApplicationError {
// Display's impl can be overridden by the attribute error marco.
@ -210,12 +184,6 @@ impl From<std::io::Error> for ApplicationError {
}
}
impl From<ring::error::Unspecified> for EncryptionError {
fn from(_: ring::error::Unspecified) -> Self {
Self
}
}
impl From<ConfigError> for ApplicationError {
fn from(err: ConfigError) -> Self {
Self::ConfigurationError(err)