From af5e1b8d3f21c0dea06bb3199ea800e9b50ea668 Mon Sep 17 00:00:00 2001 From: HuijingHei Date: Mon, 30 Sep 2024 16:38:53 +0800 Subject: [PATCH] Replace deprecated macro `dbus_proxy` and `dbus_interface` The latest version of zbus uses the deprecated macro `dbus_proxy`, replace with `#[proxy()]`. For deprecated macro `dbus_interface`, replace with `#[interface()]`. --- src/cli/ex.rs | 4 ++-- src/dbus/experimental.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli/ex.rs b/src/cli/ex.rs index 23f7ad53..471429d3 100644 --- a/src/cli/ex.rs +++ b/src/cli/ex.rs @@ -4,7 +4,7 @@ use super::ensure_user; use anyhow::Result; use clap::Subcommand; use fn_error_context::context; -use zbus::dbus_proxy; +use zbus::proxy; #[derive(Debug, Subcommand)] pub enum Cmd { @@ -44,7 +44,7 @@ impl Cmd { } } -#[dbus_proxy( +#[proxy( interface = "org.coreos.zincati.Experimental", default_service = "org.coreos.zincati", default_path = "/org/coreos/zincati" diff --git a/src/dbus/experimental.rs b/src/dbus/experimental.rs index 7b1e6c72..91ff580a 100644 --- a/src/dbus/experimental.rs +++ b/src/dbus/experimental.rs @@ -4,14 +4,14 @@ use crate::update_agent::{LastRefresh, UpdateAgent}; use actix::Addr; use futures::prelude::*; use tokio::runtime::Runtime; -use zbus::{dbus_interface, fdo}; +use zbus::{fdo, interface}; /// Experimental interface for testing. pub(crate) struct Experimental { pub(crate) agent_addr: Addr, } -#[dbus_interface(name = "org.coreos.zincati.Experimental")] +#[interface(name = "org.coreos.zincati.Experimental")] impl Experimental { /// Just a test method. fn moo(&self, talkative: bool) -> String {