itop/src/utils.rs

10 lines
181 B
Rust

#[cfg_attr(not(feature = "app"), allow(dead_code))]
pub trait Toggle {
fn toggle(&mut self);
}
impl Toggle for bool {
fn toggle(&mut self) {
*self = !*self
}
}