Enable unused_async clippy lint
This commit is contained in:
@@ -38,16 +38,16 @@ impl Console {
|
||||
})
|
||||
}
|
||||
|
||||
pub(super) async fn handle_signal(self: &Arc<Self>, sig: &'static str) {
|
||||
pub(super) fn handle_signal(self: &Arc<Self>, sig: &'static str) {
|
||||
if !self.server.running() {
|
||||
self.interrupt();
|
||||
} else if sig == "SIGINT" {
|
||||
self.interrupt_command();
|
||||
self.start().await;
|
||||
self.start();
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn start(self: &Arc<Self>) {
|
||||
pub fn start(self: &Arc<Self>) {
|
||||
let mut worker_join = self.worker_join.lock().expect("locked");
|
||||
if worker_join.is_none() {
|
||||
let self_ = Arc::clone(self);
|
||||
|
||||
@@ -6,6 +6,7 @@ pub(super) const SIGNAL: &str = "SIGUSR2";
|
||||
|
||||
/// Possibly spawn the terminal console at startup if configured.
|
||||
#[implement(super::Service)]
|
||||
#[allow(clippy::unused_async)]
|
||||
pub(super) async fn console_auto_start(&self) {
|
||||
#[cfg(feature = "console")]
|
||||
if self
|
||||
@@ -16,12 +17,13 @@ pub(super) async fn console_auto_start(&self) {
|
||||
{
|
||||
// Allow more of the startup sequence to execute before spawning
|
||||
tokio::task::yield_now().await;
|
||||
self.console.start().await;
|
||||
self.console.start();
|
||||
}
|
||||
}
|
||||
|
||||
/// Shutdown the console when the admin worker terminates.
|
||||
#[implement(super::Service)]
|
||||
#[allow(clippy::unused_async)]
|
||||
pub(super) async fn console_auto_stop(&self) {
|
||||
#[cfg(feature = "console")]
|
||||
self.console.close().await;
|
||||
|
||||
@@ -194,7 +194,7 @@ impl Service {
|
||||
}
|
||||
|
||||
#[cfg(feature = "console")]
|
||||
self.console.handle_signal(sig).await;
|
||||
self.console.handle_signal(sig);
|
||||
}
|
||||
|
||||
async fn handle_command(&self, command: CommandInput) {
|
||||
|
||||
Reference in New Issue
Block a user