We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59e501b commit d170affCopy full SHA for d170aff
aptos-move/aptos-gas-profiling/src/render.rs
@@ -93,8 +93,13 @@ pub struct TableKey<'a> {
93
94
impl Display for TableKey<'_> {
95
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
96
- assert!(self.bytes.len() > 2);
97
- write!(f, "0x{:02x}{:02x}..", self.bytes[0], self.bytes[1])
+ if self.bytes.is_empty() {
+ write!(f, "0x")
98
+ } else if self.bytes.len() == 1 {
99
+ write!(f, "0x{:02x}", self.bytes[0])
100
+ } else {
101
+ write!(f, "0x{:02x}{:02x}..", self.bytes[0], self.bytes[1])
102
+ }
103
}
104
105
0 commit comments