systemd: Move dead code warning overrides to be more specific

This commit is contained in:
Vicki Pfau 2024-08-15 21:06:24 -07:00
parent 77975d9308
commit 064207ed76

View file

@ -4,7 +4,6 @@
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
*/ */
#![allow(dead_code)]
use anyhow::{anyhow, Result}; use anyhow::{anyhow, Result};
use std::path::PathBuf; use std::path::PathBuf;
@ -115,6 +114,7 @@ impl<'dbus> SystemdUnit<'dbus> {
Ok(()) Ok(())
} }
#[allow(unused)]
pub async fn enable(&self) -> Result<bool> { pub async fn enable(&self) -> Result<bool> {
let manager = SystemdManagerProxy::new(&self.connection).await?; let manager = SystemdManagerProxy::new(&self.connection).await?;
let (_, res) = manager let (_, res) = manager
@ -123,6 +123,7 @@ impl<'dbus> SystemdUnit<'dbus> {
Ok(!res.is_empty()) Ok(!res.is_empty())
} }
#[allow(unused)]
pub async fn disable(&self) -> Result<bool> { pub async fn disable(&self) -> Result<bool> {
let manager = SystemdManagerProxy::new(&self.connection).await?; let manager = SystemdManagerProxy::new(&self.connection).await?;
let res = manager let res = manager