Skip to content

Commit 384022a

Browse files
committed
Simplify.
1 parent 130f2bc commit 384022a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

parse-display/tests/from_str.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,10 +1251,8 @@ fn assert_from_str_err<T: FromStr + Debug>(s: &str) {
12511251
}
12521252

12531253
fn panic_on_release_mode() {
1254-
let mut is_debug = false;
1255-
debug_assert!({
1256-
is_debug = true;
1257-
false
1258-
});
1259-
assert!(is_debug);
1254+
#[cfg(not(debug_assertions))]
1255+
{
1256+
panic!("release mode");
1257+
}
12601258
}

0 commit comments

Comments
 (0)