just/src/interrupt_guard.rs
Casey Rodarmor ed991cb509
Add additional continuous integration checks (#574)
Add GitHub Actions checks:

- Clippy is placated
- Rustfmt doesn't produce any changes
- Shell completion scripts are current
2020-01-15 02:16:13 -08:00

17 lines
274 B
Rust

use crate::common::*;
pub(crate) struct InterruptGuard;
impl InterruptGuard {
pub(crate) fn new() -> Self {
InterruptHandler::instance().block();
Self
}
}
impl Drop for InterruptGuard {
fn drop(&mut self) {
InterruptHandler::instance().unblock();
}
}