Skip to content

Commit 78db1bf

Browse files
authored
Merge pull request #211 from github/smaller_trap
Tweaks to reduce size of TRAP output
2 parents 872c7ed + ab72b4e commit 78db1bf

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

extractor/src/extractor.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -720,9 +720,9 @@ impl fmt::Display for Program {
720720
}
721721

722722
enum TrapEntry {
723-
/// Maps the label to a fresh id, e.g. `#123 = *`.
723+
/// Maps the label to a fresh id, e.g. `#123=*`.
724724
FreshId(Label),
725-
/// Maps the label to a key, e.g. `#7 = @"foo"`.
725+
/// Maps the label to a key, e.g. `#7=@"foo"`.
726726
MapLabelToKey(Label, String),
727727
/// foo_bar(arg*)
728728
GenericTuple(String, Vec<Arg>),
@@ -731,15 +731,15 @@ enum TrapEntry {
731731
impl fmt::Display for TrapEntry {
732732
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
733733
match self {
734-
TrapEntry::FreshId(label) => write!(f, "{} = *", label),
734+
TrapEntry::FreshId(label) => write!(f, "{}=*", label),
735735
TrapEntry::MapLabelToKey(label, key) => {
736-
write!(f, "{} = @\"{}\"", label, key.replace("\"", "\"\""))
736+
write!(f, "{}=@\"{}\"", label, key.replace("\"", "\"\""))
737737
}
738738
TrapEntry::GenericTuple(name, args) => {
739739
write!(f, "{}(", name)?;
740740
for (index, arg) in args.iter().enumerate() {
741741
if index > 0 {
742-
write!(f, ", ")?;
742+
write!(f, ",")?;
743743
}
744744
write!(f, "{}", arg)?;
745745
}
@@ -756,7 +756,7 @@ struct Label(u32);
756756

757757
impl fmt::Display for Label {
758758
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
759-
write!(f, "#{}", self.0)
759+
write!(f, "#{:x}", self.0)
760760
}
761761
}
762762

0 commit comments

Comments
 (0)