Factor bespoke debug variables into debug_flags crate

This commit is contained in:
Ayaz Hafiz 2022-04-29 17:45:55 -04:00
parent 5e47e4767e
commit 9964f86a3d
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
13 changed files with 167 additions and 70 deletions

View file

@ -449,15 +449,12 @@ fn write_content<'a>(
);
}
// useful for debugging
if cfg!(debug_assertions)
&& std::env::var("ROC_PRETTY_PRINT_ALIAS_CONTENTS").is_ok()
{
roc_debug_flags::dbg_do!(roc_debug_flags::ROC_PRETTY_PRINT_ALIAS_CONTENTS, {
buf.push_str("[[ but really ");
let content = subs.get_content_without_compacting(*_actual);
write_content(env, ctx, content, subs, buf, parens);
buf.push_str("]]");
}
});
}),
}
}