mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 23:18:24 +00:00
style(test): remove needless URL borrows
Apply the remaining Rust 1.96 clippy suggestions in live-sync tests. The metrics helper already accepts string references from TestRelay directly, so borrowing those references again is redundant. This is a mechanical test-only lint repair with no behavior change. Validated by the clean workspace clippy run in the preceding commit.
This commit is contained in:
@@ -53,7 +53,7 @@ async fn replacement_announcement_retires_old_relay_only_after_natural_disconnec
|
||||
async move {
|
||||
let deadline = tokio::time::Instant::now() + Duration::from_secs(10);
|
||||
loop {
|
||||
let metrics = fetch_metrics(&relay_url).await.unwrap_or_default();
|
||||
let metrics = fetch_metrics(relay_url).await.unwrap_or_default();
|
||||
if metrics.contains(&required)
|
||||
&& absent.as_ref().is_none_or(|label| !metrics.contains(label))
|
||||
{
|
||||
@@ -102,7 +102,7 @@ async fn replacement_announcement_retires_old_relay_only_after_natural_disconnec
|
||||
"replacement should establish the new relay"
|
||||
);
|
||||
assert!(
|
||||
fetch_metrics(&syncing.url())
|
||||
fetch_metrics(syncing.url())
|
||||
.await
|
||||
.unwrap_or_default()
|
||||
.contains(&old_label),
|
||||
@@ -223,7 +223,7 @@ async fn live_sync_regroups_after_filter_count_refusal() {
|
||||
|
||||
let refusal_deadline = tokio::time::Instant::now() + Duration::from_secs(10);
|
||||
loop {
|
||||
let metrics = fetch_metrics(&syncing.url()).await.unwrap_or_default();
|
||||
let metrics = fetch_metrics(syncing.url()).await.unwrap_or_default();
|
||||
if metrics.contains("ngit_sync_policy_refusals_total") && metrics.contains("filter_count") {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user