Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Shella committed Oct 4, 2023
1 parent c378f1c commit ff6a95c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions src/config/provider/softsign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,17 @@ impl AsRef<Path> for SoftPrivateKey {
}

/// Private key format
#[derive(Copy, Clone, Debug, Deserialize, Eq, Hash, PartialEq)]
#[derive(Copy, Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq)]
pub enum KeyFormat {
/// Base64-encoded
#[serde(rename = "base64")]
#[default]
Base64,

/// JSON
#[serde(rename = "json")]
Json,
}

impl Default for KeyFormat {
fn default() -> Self {
KeyFormat::Base64
}
}

impl FromStr for KeyFormat {
type Err = Error;

Expand Down
10 changes: 2 additions & 8 deletions src/tx_signer/last_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
use tendermint_rpc::endpoint::broadcast::tx_commit;

/// State of the last broadcasted transaction
#[derive(Clone, Debug)]
#[derive(Clone, Default, Debug)]
pub enum LastTx {
#[default]
/// No previously broadcast transaction (i.e. starting up)
None,

Expand All @@ -14,13 +15,6 @@ pub enum LastTx {
/// Error broadcasting the previous transaction
Error(tendermint_rpc::error::Error),
}

impl Default for LastTx {
fn default() -> LastTx {
LastTx::None
}
}

impl LastTx {
/// Get the RPC response, if there was one
pub fn response(&self) -> Option<&tx_commit::Response> {
Expand Down

0 comments on commit ff6a95c

Please sign in to comment.