mirror of
https://github.com/bspeice/qadapt
synced 2025-07-02 06:16:30 -04:00
Add an is_active
function, and remove panic on not using
This commit is contained in:
4
tests/inactive.rs
Normal file
4
tests/inactive.rs
Normal file
@ -0,0 +1,4 @@
|
||||
#[test]
|
||||
fn is_inactive() {
|
||||
assert!(!qadapt::is_active());
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
use qadapt::enter_protected;
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn guard_without_initialization() {
|
||||
if cfg!(debug_assertions) {
|
||||
enter_protected();
|
||||
} else {
|
||||
panic!("Intentional")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user