relax and de-clutter let_underscore_must_use

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-07-08 16:10:18 +00:00
parent 100c6f572b
commit 23a9055199
9 changed files with 5 additions and 29 deletions

View file

@ -45,7 +45,6 @@ impl Console {
}
}
#[allow(clippy::let_underscore_must_use)]
pub async fn start(self: &Arc<Self>) {
let mut worker_join = self.worker_join.lock().expect("locked");
if worker_join.is_none() {
@ -54,7 +53,6 @@ impl Console {
}
}
#[allow(clippy::let_underscore_must_use)]
pub async fn close(self: &Arc<Self>) {
self.interrupt();
let Some(worker_join) = self.worker_join.lock().expect("locked").take() else {
@ -113,7 +111,6 @@ impl Console {
self.worker_join.lock().expect("locked").take();
}
#[allow(clippy::let_underscore_must_use)]
async fn readline(self: &Arc<Self>) -> Result<ReadlineEvent, ReadlineError> {
let _suppression = log::Suppress::new(&services().server);
@ -138,7 +135,6 @@ impl Console {
result
}
#[allow(clippy::let_underscore_must_use)]
async fn handle(self: Arc<Self>, line: String) {
if line.trim().is_empty() {
return;

View file

@ -37,7 +37,6 @@ conduit::mod_dtor! {}
static SERVICES: RwLock<Option<&Services>> = RwLock::new(None);
#[allow(clippy::let_underscore_must_use)]
pub async fn init(server: &Arc<Server>) -> Result<()> {
let d = Arc::new(Database::open(server).await?);
let s = Box::new(Services::build(server.clone(), d)?);

View file

@ -132,11 +132,7 @@ impl Services {
if self.globals.allow_check_for_updates() {
let handle = globals::updates::start_check_for_updates_task();
#[allow(clippy::let_underscore_must_use)] // needed for shutdown
{
_ = self.globals.updates_handle.lock().await.insert(handle);
}
_ = self.globals.updates_handle.lock().await.insert(handle);
}
debug_info!("Services startup complete.");
@ -159,11 +155,7 @@ impl Services {
debug!("Waiting for update worker...");
if let Some(updates_handle) = self.globals.updates_handle.lock().await.take() {
updates_handle.abort();
#[allow(clippy::let_underscore_must_use)]
{
_ = updates_handle.await;
}
_ = updates_handle.await;
}
for (name, service) in &self.service {