Import a few more zbus things to reduce namespace line length

This commit is contained in:
Vicki Pfau 2024-06-26 19:38:12 -07:00
parent 7213ea5179
commit 450541b2bd
5 changed files with 20 additions and 21 deletions

View file

@ -9,7 +9,7 @@
use anyhow::{anyhow, bail, Result};
use std::path::PathBuf;
use zbus::zvariant::OwnedObjectPath;
use zbus::Connection;
use zbus::{CacheProperties, Connection};
#[zbus::proxy(
interface = "org.freedesktop.systemd1.Unit",
@ -88,7 +88,7 @@ impl<'dbus> SystemdUnit<'dbus> {
let path = String::from(path.to_str().ok_or(anyhow!("Unit name {name} invalid"))?);
Ok(SystemdUnit {
proxy: SystemdUnitProxy::builder(&connection)
.cache_properties(zbus::CacheProperties::No)
.cache_properties(CacheProperties::No)
.path(path)?
.build()
.await?,