Skip to content

Commit

Permalink
feat: implement UpperHex for Flags
Browse files Browse the repository at this point in the history
  • Loading branch information
toku-sa-n committed Jun 4, 2021
1 parent 3b7439c commit e05218e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/program.rs
Expand Up @@ -228,6 +228,14 @@ impl fmt::LowerHex for Flags {
}
}

impl fmt::UpperHex for Flags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let val = self.0;

write!(f, "{:#X}", val)
}
}

#[derive(Copy, Clone, Default)]
pub struct Type_(u32);

Expand Down

0 comments on commit e05218e

Please sign in to comment.