Skip to content

Commit

Permalink
Move Hash back to derive.
Browse files Browse the repository at this point in the history
  • Loading branch information
dacut committed Sep 19, 2022
1 parent fbd72ee commit 9d3fcb9
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions arn/src/arn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use {
/// ARNs used to match resource statements, see [ArnPattern].
///
/// [Arn] objects are immutable.
#[derive(Debug, Clone, Eq, Ord, PartialEq, PartialOrd)]
#[derive(Debug, Clone, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Arn {
partition: String,
service: String,
Expand All @@ -29,17 +29,6 @@ pub struct Arn {
resource: String,
}

#[allow(clippy::derive_hash_xor_eq)]
impl Hash for Arn {
fn hash<H: Hasher>(&self, state: &mut H) {
self.partition.hash(state);
self.service.hash(state);
self.region.hash(state);
self.account_id.hash(state);
self.resource.hash(state);
}
}

impl Arn {
/// Create a new ARN from the specified components.
///
Expand Down

0 comments on commit 9d3fcb9

Please sign in to comment.