Polymorphic expression specialization works in gen tests

This commit is contained in:
Ayaz Hafiz 2022-05-03 17:46:30 -04:00
parent f21ce43e30
commit 261df36c50
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
7 changed files with 363 additions and 206 deletions

View file

@ -34,7 +34,8 @@ macro_rules! dbg_do {
($flag:path, $expr:expr) => {
#[cfg(debug_assertions)]
{
if std::env::var($flag).as_ref() == Ok(&"0".to_string()) {
let flag = std::env::var($flag);
if !flag.is_err() && flag.as_deref() != Ok("0") {
$expr
}
}