Skip to content

Commit

Permalink
Changed format as per PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Jun 6, 2023
1 parent 4d424ef commit 52ccdad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ and this project adheres to
- cosmwasm-vm: Add `.wasm` extension to stored wasm files ([#1686]).
- cosmwasm-vm: Upgrade Wasmer to version 3.3.0.
- cosmwasm-check: Update clap dependency to version 4 ([#1677])
- cosmwasm-std: Coin uses `123ucosm` format for Debug as well as Display
- cosmwasm-std: Coin uses `Coin { 123 "ucosm" }` format for Debug as well as Display
([#1704])

[#1511]: https://github.com/CosmWasm/cosmwasm/issues/1511
Expand Down
4 changes: 2 additions & 2 deletions packages/std/src/coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl Coin {

impl fmt::Debug for Coin {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}{}", self.amount, self.denom)
write!(f, "Coin {{ {} \"{}\" }}", self.amount, self.denom)
}
}

Expand Down Expand Up @@ -245,6 +245,6 @@ mod tests {
#[test]
fn debug_coin() {
let coin = Coin::new(123, "ucosm");
assert_eq!(format!("{:?}", coin), "123ucosm");
assert_eq!(format!("{:?}", coin), r#"Coin { 123 "ucosm" }"#);
}
}

0 comments on commit 52ccdad

Please sign in to comment.