Simplify `Display` impl of `SerializedSignature`

This is shorter and avoids duplication of slicing logic.
This commit is contained in:
Martin Habovstiak 2022-06-21 21:14:14 +02:00
parent 5d51b9d94b
commit 0e0fa06e41
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ impl fmt::Debug for SerializedSignature {
impl fmt::Display for SerializedSignature { impl fmt::Display for SerializedSignature {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
for v in self.data.iter().take(self.len) { for v in self {
write!(f, "{:02x}", v)?; write!(f, "{:02x}", v)?;
} }
Ok(()) Ok(())