lint
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
#![warn(
|
||||
clippy::all,
|
||||
clippy::pedantic,
|
||||
)]
|
||||
use log::info;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
|
||||
pub mod logger;
|
||||
pub mod command;
|
||||
pub mod logger;
|
||||
pub mod telemetry;
|
||||
pub mod udp;
|
||||
|
||||
/// Add a ctrl-c handler which will set an atomic flag to `false` when ctrl-c is detected
|
||||
///
|
||||
/// # Errors
|
||||
/// If a system error occurred while trying to set the ctrl-c handler
|
||||
pub fn add_ctrlc_handler(flag: Arc<AtomicBool>) -> anyhow::Result<()> {
|
||||
ctrlc::set_handler(move || {
|
||||
info!("Shutdown Requested");
|
||||
|
||||
Reference in New Issue
Block a user