avoid single variant match statements
This commit is contained in:
parent
7239d6dfd6
commit
fed18d3726
2 changed files with 28 additions and 38 deletions
|
|
@ -90,11 +90,8 @@ pub async fn create_service(connection: &zbus::Connection) -> zbus::Result<()> {
|
|||
let mut name_owner_changed_stream = dbus_proxy.receive_name_owner_changed().await?;
|
||||
|
||||
let flags = RequestNameFlags::AllowReplacement.into();
|
||||
match dbus_proxy.request_name(NAME.as_ref(), flags).await? {
|
||||
RequestNameReply::InQueue => {
|
||||
eprintln!("Bus name '{}' already owned", NAME);
|
||||
}
|
||||
_ => {}
|
||||
if dbus_proxy.request_name(NAME.as_ref(), flags).await? == RequestNameReply::InQueue {
|
||||
eprintln!("Bus name '{}' already owned", NAME);
|
||||
}
|
||||
|
||||
let connection = connection.clone();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue