diff --git a/autoendpoint/src/error.rs b/autoendpoint/src/error.rs index 36c80a89..f7addc53 100644 --- a/autoendpoint/src/error.rs +++ b/autoendpoint/src/error.rs @@ -200,7 +200,9 @@ impl ApiErrorKind { | ApiErrorKind::InvalidAuthentication | ApiErrorKind::InvalidLocalAuth(_) | // Ignore missing or invalid user errors - ApiErrorKind::NoUser | ApiErrorKind::NoSubscription, + ApiErrorKind::NoUser | ApiErrorKind::NoSubscription | + // Ignore overflow errors + ApiErrorKind::Router(RouterError::TooMuchData(_)), ) } diff --git a/autoendpoint/src/extractors/routers.rs b/autoendpoint/src/extractors/routers.rs index 66f0c893..26dcf8cb 100644 --- a/autoendpoint/src/extractors/routers.rs +++ b/autoendpoint/src/extractors/routers.rs @@ -13,7 +13,7 @@ use std::str::FromStr; use std::sync::Arc; /// Valid `DynamoDbUser::router_type` values -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] #[allow(clippy::upper_case_acronyms)] pub enum RouterType { WebPush, diff --git a/autoendpoint/src/headers/vapid.rs b/autoendpoint/src/headers/vapid.rs index b7d101dc..bd98e928 100644 --- a/autoendpoint/src/headers/vapid.rs +++ b/autoendpoint/src/headers/vapid.rs @@ -5,7 +5,7 @@ use thiserror::Error; pub const ALLOWED_SCHEMES: [&str; 3] = ["bearer", "webpush", "vapid"]; /// Parses the VAPID authorization header -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] pub struct VapidHeader { pub scheme: String, pub token: String, @@ -21,7 +21,7 @@ pub struct VapidHeaderWithKey { } /// Version-specific VAPID data. Also used to identify the VAPID version. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] pub enum VapidVersionData { Version1, Version2 { public_key: String }, @@ -77,7 +77,7 @@ impl VapidHeader { } } -#[derive(Debug, Error, PartialEq)] +#[derive(Debug, Error, Eq, PartialEq)] pub enum VapidError { #[error("Missing VAPID token")] MissingToken, diff --git a/autoendpoint/src/routers/apns/router.rs b/autoendpoint/src/routers/apns/router.rs index 03dfb9a2..4a23ea23 100644 --- a/autoendpoint/src/routers/apns/router.rs +++ b/autoendpoint/src/routers/apns/router.rs @@ -335,6 +335,7 @@ mod tests { const DEVICE_TOKEN: &str = "test-token"; const APNS_ID: &str = "deadbeef-4f5e-4403-be8f-35d0251655f5"; + #[allow(clippy::type_complexity)] /// A mock APNS client which allows one to supply a custom APNS response/error struct MockApnsClient { send_fn: Box) -> Result + Send + Sync>, diff --git a/autoendpoint/src/routers/mod.rs b/autoendpoint/src/routers/mod.rs index 76e43cef..bbccd63e 100644 --- a/autoendpoint/src/routers/mod.rs +++ b/autoendpoint/src/routers/mod.rs @@ -34,7 +34,7 @@ pub trait Router { } /// The response returned when a router routes a notification -#[derive(Debug, PartialEq)] +#[derive(Debug, Eq, PartialEq)] pub struct RouterResponse { pub status: StatusCode, pub headers: HashMap<&'static str, String>, diff --git a/autopush-common/src/db/models.rs b/autopush-common/src/db/models.rs index 84a3b5c0..3be9c5cb 100644 --- a/autopush-common/src/db/models.rs +++ b/autopush-common/src/db/models.rs @@ -63,7 +63,7 @@ impl From> for NotificationHeaders { } } -#[derive(Deserialize, PartialEq, Debug, Clone, Serialize)] +#[derive(Deserialize, Eq, PartialEq, Debug, Clone, Serialize)] pub struct DynamoDbUser { // DynamoDB #[serde(serialize_with = "uuid_serializer")] diff --git a/autopush/src/megaphone.rs b/autopush/src/megaphone.rs index 8e005068..e4169ce7 100644 --- a/autopush/src/megaphone.rs +++ b/autopush/src/megaphone.rs @@ -67,7 +67,7 @@ struct BroadcastRevision { // A provided Broadcast/Version used for `BroadcastSubsInit`, client comparisons, and outgoing // deltas -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] pub struct Broadcast { broadcast_id: String, version: String,