client-api: Make ErrorKind comparable

This commit is contained in:
Alejandro Domínguez 2020-09-29 16:17:21 +02:00 committed by GitHub
parent 648c3f5732
commit d1f8a7404c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,9 +12,8 @@ use serde_json::{from_slice as from_json_slice, to_vec as to_json_vec};
use strum::{AsRefStr, Display}; use strum::{AsRefStr, Display};
/// An enum for the error kind. Items may contain additional information. /// An enum for the error kind. Items may contain additional information.
#[derive(Debug, Clone, Serialize, Deserialize, AsRefStr, Display)] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, AsRefStr, Display)]
#[serde(tag = "errcode")] #[serde(tag = "errcode")]
#[cfg_attr(test, derive(PartialEq))]
pub enum ErrorKind { pub enum ErrorKind {
/// M_FORBIDDEN /// M_FORBIDDEN
#[serde(rename = "M_FORBIDDEN")] #[serde(rename = "M_FORBIDDEN")]