diff --git a/src/util/error.rs b/src/util/error.rs index b55f232..aadce12 100644 --- a/src/util/error.rs +++ b/src/util/error.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize}; /// A location in the source code /// A thin wrapper over `std::panic::Location`, which isn't `Serialize` or `Deserialize` -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ErrorLocation { file: String, line: u32, @@ -59,7 +59,7 @@ fn rand_modal_id() -> String { format!("err-modal-{random_str}") } -#[derive(Debug, Clone, Deserialize, Serialize, thiserror::Error)] +#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, thiserror::Error)] pub struct Error { #[source] /// The error type and data @@ -307,7 +307,7 @@ impl> Contextualize> for E { } } -#[derive(Debug, Clone, thiserror::Error, Deserialize, Serialize)] +#[derive(Debug, Clone, PartialEq, thiserror::Error, Deserialize, Serialize)] pub enum ErrorType { #[error("Authentication error: {0}")] Auth(AuthError), @@ -365,7 +365,7 @@ impl From for Error { } } -#[derive(Debug, Clone, thiserror::Error, Deserialize, Serialize)] +#[derive(Debug, Clone, PartialEq, thiserror::Error, Deserialize, Serialize)] pub enum AuthError { #[error("Invalid credentials")] InvalidCredentials,