Skip to content

Commit

Permalink
🚨 tests: Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeeshan Ali Khan committed Feb 10, 2024
1 parent 770cf4f commit a0e9979
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/fdo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async fn name_ownership_changes() {
}

// TCP socket
let address = format!("tcp:host=127.0.0.1,port=4242");
let address = "tcp:host=127.0.0.1,port=4242".to_string();
name_ownership_changes_(&address, AuthMechanism::Cookie).await;
name_ownership_changes_(&address, AuthMechanism::Anonymous).await;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/greet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async fn greet() {
}

// TCP socket
let address = format!("tcp:host=127.0.0.1,port=4248");
let address = "tcp:host=127.0.0.1,port=4248".to_string();
greet_(&address, AuthMechanism::Cookie).await;
greet_(&address, AuthMechanism::Anonymous).await;
}
Expand Down
9 changes: 4 additions & 5 deletions tests/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use zbus::{
async fn become_monitor() {
busd::tracing_subscriber::init();

let address = format!("tcp:host=127.0.0.1,port=4242");
let address = "tcp:host=127.0.0.1,port=4242".to_string();
let mut bus = Bus::for_address(Some(&address), AuthMechanism::Anonymous)
.await
.unwrap();
Expand Down Expand Up @@ -57,10 +57,9 @@ async fn become_monitor_client(address: &str, tx: Sender<()>) -> anyhow::Result<
// Signals for the monitor loosing its unique name.
let signal = loop {
let msg = msg_stream.try_next().await?.unwrap();
match NameOwnerChanged::from_message(msg) {
Some(signal) => break signal,
// Ignore other messages (e.g `BecomeMonitor` method & reply)
None => (),
// Ignore other messages (e.g `BecomeMonitor` method & reply)
if let Some(signal) = NameOwnerChanged::from_message(msg) {
break signal;
}
};
let args = signal.args()?;
Expand Down
2 changes: 1 addition & 1 deletion tests/multiple_conns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async fn multi_conenct() {
}

// TCP socket
let address = format!("tcp:host=127.0.0.1,port=4246");
let address = "tcp:host=127.0.0.1,port=4246".to_string();
multi_conenct_(&address, AuthMechanism::Cookie).await;
multi_conenct_(&address, AuthMechanism::Anonymous).await;
}
Expand Down

0 comments on commit a0e9979

Please sign in to comment.