remove needless borrows
This commit is contained in:
parent
94f9879a39
commit
41b88532c9
5 changed files with 9 additions and 9 deletions
|
|
@ -18,7 +18,7 @@ impl StatusNotifierItem {
|
|||
(name.as_str(), "/StatusNotifierItem")
|
||||
};
|
||||
|
||||
let item_proxy = StatusNotifierItemProxy::builder(&connection)
|
||||
let item_proxy = StatusNotifierItemProxy::builder(connection)
|
||||
.destination(dest.to_string())?
|
||||
.path(path.to_string())?
|
||||
.build()
|
||||
|
|
@ -27,7 +27,7 @@ impl StatusNotifierItem {
|
|||
let icon_name = item_proxy.icon_name().await?;
|
||||
|
||||
let menu_path = item_proxy.menu().await?;
|
||||
let menu_proxy = DBusMenuProxy::builder(&connection)
|
||||
let menu_proxy = DBusMenuProxy::builder(connection)
|
||||
.destination(dest.to_string())?
|
||||
.path(menu_path)?
|
||||
.build()
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ trait StatusNotifierWatcher {
|
|||
}
|
||||
|
||||
pub async fn watch(connection: &zbus::Connection) -> zbus::Result<EventStream> {
|
||||
let watcher = StatusNotifierWatcherProxy::new(&connection).await?;
|
||||
let watcher = StatusNotifierWatcherProxy::new(connection).await?;
|
||||
|
||||
let name = connection.unique_name().unwrap().as_str();
|
||||
if let Err(err) = watcher.register_status_notifier_host(name).await {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ pub async fn create_service(connection: &zbus::Connection) -> zbus::Result<()> {
|
|||
.interface::<_, StatusNotifierWatcher>(OBJECT_PATH)
|
||||
.await
|
||||
.unwrap();
|
||||
let dbus_proxy = DBusProxy::new(&connection).await?;
|
||||
let dbus_proxy = DBusProxy::new(connection).await?;
|
||||
let mut name_owner_changed_stream = dbus_proxy.receive_name_owner_changed().await?;
|
||||
|
||||
let flags = RequestNameFlags::AllowReplacement.into();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue