Skip to content

Commit 8e112a8

Browse files
authored
Exclude KMS account client from the Debug impl (#984)
1 parent c057a6e commit 8e112a8

File tree

1 file changed

+11
-1
lines changed
  • ethcontract/src/transaction

1 file changed

+11
-1
lines changed

ethcontract/src/transaction/kms.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,23 @@ use web3::{
2323
use crate::errors::ExecutionError;
2424

2525
/// An AWS KMS account abstraction.
26-
#[derive(Clone, Debug)]
26+
#[derive(Clone)]
2727
pub struct Account {
2828
client: Client,
2929
key_id: String,
3030
address: Address,
3131
}
3232

33+
impl std::fmt::Debug for Account {
34+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
35+
f.debug_struct("Account")
36+
.field("key_id", &self.key_id)
37+
.field("address", &self.address)
38+
// Skip the client field as it contains too verbose output
39+
.finish()
40+
}
41+
}
42+
3343
impl Account {
3444
/// Creates a new KMS account.
3545
pub async fn new(config: Config, key_id: &str) -> Result<Self, Error> {

0 commit comments

Comments
 (0)