use crate::model::ByteArray;
use core::fmt::{Debug, Display, Formatter};
impl Display for ByteArray {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
#[cfg(debug_assertions)] return self.bytes.fmt(f);
#[cfg(not(debug_assertions))]
return write!(f, "ByteArray length: {}", self.len());
}
}
impl Debug for ByteArray {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
<ByteArray as Display>::fmt(self, f)
}
}