Improve formatting of SignedPods: show keys as strings (#95)
* Improve formatting of SignedPods: show keys as strings * Cargo fmt
This commit is contained in:
parent
423605f867
commit
a2bcb501e8
1 changed files with 7 additions and 1 deletions
|
|
@ -151,7 +151,13 @@ impl fmt::Display for SignedPod {
|
||||||
// deterministic based on the keys values not on the order of the keys when added into the
|
// deterministic based on the keys values not on the order of the keys when added into the
|
||||||
// tree.
|
// tree.
|
||||||
for (k, v) in self.kvs().iter().sorted_by_key(|kv| kv.0) {
|
for (k, v) in self.kvs().iter().sorted_by_key(|kv| kv.0) {
|
||||||
writeln!(f, " - {}: {}", k, v)?;
|
writeln!(
|
||||||
|
f,
|
||||||
|
" - {} = {}: {}",
|
||||||
|
k,
|
||||||
|
*self.key_string_map.get(&k).unwrap_or(&"--".to_string()),
|
||||||
|
v
|
||||||
|
)?;
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue