Skip to content

Commit

Permalink
Implement Eq on types in aws-smithy-xml
Browse files Browse the repository at this point in the history
  • Loading branch information
jjant committed Oct 7, 2022
1 parent 78f4b07 commit 590f01a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rust-runtime/aws-smithy-eventstream/src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -368,7 +368,7 @@ pub fn write_headers_to<B: BufMut>(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<Header>,
payload: Bytes,
Expand Down
6 changes: 3 additions & 3 deletions rust-runtime/aws-smithy-xml/src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<Attr<'a>>,
Expand Down

0 comments on commit 590f01a

Please sign in to comment.