Skip to content

Commit

Permalink
Replace deprecated macro dbus_proxy and dbus_interface
Browse files Browse the repository at this point in the history
The latest version of zbus uses the deprecated macro `dbus_proxy`,
replace with `#[proxy()]`.
For deprecated macro `dbus_interface`, replace with `#[interface()]`.
  • Loading branch information
HuijingHei committed Sep 30, 2024
1 parent fcaca7f commit 16f8fa5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cli/ex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -44,7 +44,7 @@ impl Cmd {
}
}

#[dbus_proxy(
#[proxy(
interface = "org.coreos.zincati.Experimental",
default_service = "org.coreos.zincati",
default_path = "/org/coreos/zincati"
Expand Down
4 changes: 2 additions & 2 deletions src/dbus/experimental.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{interface, fdo};

/// Experimental interface for testing.
pub(crate) struct Experimental {
pub(crate) agent_addr: Addr<UpdateAgent>,
}

#[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 {
Expand Down

0 comments on commit 16f8fa5

Please sign in to comment.