diff --git a/packages/sync/src/range.rs b/packages/sync/src/range.rs index cd43d4f8..cefb2a3a 100644 --- a/packages/sync/src/range.rs +++ b/packages/sync/src/range.rs @@ -1,4 +1,5 @@ use std::{ + fmt::{Debug, Formatter}, iter::Sum, ops::{Add, Mul, Sub}, }; @@ -269,6 +270,16 @@ where } } +// Use Debug output for Display as well +impl std::fmt::Display for ValueRange +where + T: Debug, +{ + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self) + } +} + #[cfg(test)] mod tests { use cosmwasm_std::{Decimal, Uint128}; diff --git a/packages/sync/src/txs.rs b/packages/sync/src/txs.rs index 0af4be47..0ac9b5da 100644 --- a/packages/sync/src/txs.rs +++ b/packages/sync/src/txs.rs @@ -59,7 +59,7 @@ impl Tx { } } -// Use Debug output for display as well (simplify the previous hand-coding of that) +// Use Debug output for Display as well impl std::fmt::Display for Tx { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self)