Skip to content

Commit

Permalink
Add Eq/PartialEq impls for Proposal and subfields (#3862)
Browse files Browse the repository at this point in the history
  • Loading branch information
plaidfinch authored Feb 22, 2024
1 parent bb17fe4 commit 22f5f74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/core/component/governance/src/proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use penumbra_shielded_pool::params::ShieldedPoolParameters;
use penumbra_stake::params::StakeParameters;

/// A governance proposal.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(try_from = "pb::Proposal", into = "pb::Proposal")]
pub struct Proposal {
/// The ID number of the proposal.
Expand Down Expand Up @@ -197,7 +197,7 @@ impl TryFrom<ProposalToml> for Proposal {
}

/// The specific kind of a proposal.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Eq, PartialEq)]
#[cfg_attr(feature = "clap", derive(clap::Subcommand))]
pub enum ProposalKind {
/// A signaling proposal.
Expand Down Expand Up @@ -254,7 +254,7 @@ impl Proposal {
}

/// The machine-interpretable body of a proposal.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum ProposalPayload {
/// A signaling proposal is merely for coordination; it does not enact anything automatically by
/// itself.
Expand Down Expand Up @@ -429,7 +429,7 @@ impl ProposalPayload {
///
/// Note: must be kept in sync with
/// `penumbra_app::params::AppParameters`.
#[derive(Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
#[serde(
try_from = "pb::ChangedAppParameters",
into = "pb::ChangedAppParameters"
Expand Down

0 comments on commit 22f5f74

Please sign in to comment.