util: Turn on ndebug in release mode, and fix task-state to not crash

when `ndebug` is on.
This commit is contained in:
Patrick Walton 2015-03-18 13:17:22 -07:00
parent 4863eb65e9
commit fda3791487
2 changed files with 12 additions and 5 deletions

View file

@ -26,9 +26,14 @@ bitflags! {
macro_rules! task_types ( ( $( $fun:ident = $flag:ident ; )* ) => (
impl TaskState {
$(
#[cfg(not(ndebug))]
pub fn $fun(self) -> bool {
self.contains($flag)
}
#[cfg(ndebug)]
pub fn $fun(self) -> bool {
true
}
)*
}