Make always-assert crate reusable

This commit is contained in:
Aleksey Kladov
2021-01-26 22:11:12 +03:00
parent 2664aee8e5
commit d35bda6429
11 changed files with 24 additions and 73 deletions

View File

@@ -75,15 +75,6 @@ fn setup_logging(log_file: Option<PathBuf>) -> Result<()> {
profile::init();
if !cfg!(debug_assertions) {
stdx::set_assert_hook(|loc, args| {
if env::var("RA_PROFILE").is_ok() {
panic!("assertion failed at {}: {}", loc, args)
}
log::error!("assertion failed at {}: {}", loc, args)
});
}
Ok(())
}