From 590f01af7326bde7de97cae97feeedf593b9239b Mon Sep 17 00:00:00 2001 From: Julian Antonielli Date: Fri, 7 Oct 2022 12:09:47 +0100 Subject: [PATCH] Implement Eq on types in aws-smithy-xml --- rust-runtime/aws-smithy-eventstream/src/frame.rs | 4 ++-- rust-runtime/aws-smithy-xml/src/decode.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rust-runtime/aws-smithy-eventstream/src/frame.rs b/rust-runtime/aws-smithy-eventstream/src/frame.rs index 2be5c688b0..ad9d3d9e14 100644 --- a/rust-runtime/aws-smithy-eventstream/src/frame.rs +++ b/rust-runtime/aws-smithy-eventstream/src/frame.rs @@ -300,7 +300,7 @@ pub use value::HeaderValue; /// Event Stream header. #[non_exhaustive] -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] #[cfg_attr(feature = "derive-arbitrary", derive(arbitrary::Arbitrary))] pub struct Header { name: StrBytes, @@ -368,7 +368,7 @@ pub fn write_headers_to(headers: &[Header], mut buffer: B) -> Result< /// Event Stream message. #[non_exhaustive] -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Message { headers: Vec
, payload: Bytes, diff --git a/rust-runtime/aws-smithy-xml/src/decode.rs b/rust-runtime/aws-smithy-xml/src/decode.rs index 936d4c3d32..f4ee499e3d 100644 --- a/rust-runtime/aws-smithy-xml/src/decode.rs +++ b/rust-runtime/aws-smithy-xml/src/decode.rs @@ -51,7 +51,7 @@ impl XmlError { } } -#[derive(PartialEq, Debug)] +#[derive(PartialEq, Eq, Debug)] pub struct Name<'a> { pub prefix: &'a str, pub local: &'a str, @@ -72,14 +72,14 @@ impl Name<'_> { } } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub struct Attr<'a> { name: Name<'a>, // attribute values can be escaped (e.g. with double quotes, so we need a Cow) value: Cow<'a, str>, } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub struct StartEl<'a> { name: Name<'a>, attributes: Vec>,