diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-11 16:53:03 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-11 16:53:03 +0000 |
| commit | 2a9160836bb87fdea3ae891563b0169c68d1c2ab (patch) | |
| tree | 583c890687beaf7f380fc0be131bdf17485f06fa /tests/common/relay.rs | |
| parent | 52489d3b1a7d79e164b4cc901b53fd06c05ce1b1 (diff) | |
fix: resolve all fmt and clippy warnings
Main lib (src/):
- Add #[allow(dead_code)] for build_info field (stored to prevent Prometheus unregistration)
- Add #[allow(dead_code)] for first_seen field (reserved for future rate limiting)
- Replace .or_insert_with(RelaySyncNeeds::default) with .or_default()
- Replace manual div_ceil implementations with .div_ceil(100)
Test code (tests/):
- Replace .expect(&format!(...)) with .unwrap_or_else(|_| panic!(...))
- Remove needless borrows in fetch_metrics() calls
- Add #[allow(dead_code)] and #[allow(unused_imports)] to test helpers module
grasp-audit:
- Apply cargo fmt to fix formatting
Diffstat (limited to 'tests/common/relay.rs')
| -rw-r--r-- | tests/common/relay.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/common/relay.rs b/tests/common/relay.rs index 2dd526b..55cc18e 100644 --- a/tests/common/relay.rs +++ b/tests/common/relay.rs | |||
| @@ -104,7 +104,11 @@ impl TestRelay { | |||
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | /// Start relay with full options | 106 | /// Start relay with full options |
| 107 | async fn start_with_full_options(port: u16, bootstrap_relay_url: Option<String>, disable_negentropy: bool) -> Self { | 107 | async fn start_with_full_options( |
| 108 | port: u16, | ||
| 109 | bootstrap_relay_url: Option<String>, | ||
| 110 | disable_negentropy: bool, | ||
| 111 | ) -> Self { | ||
| 108 | let bind_address = format!("127.0.0.1:{}", port); | 112 | let bind_address = format!("127.0.0.1:{}", port); |
| 109 | let url = format!("ws://127.0.0.1:{}", port); | 113 | let url = format!("ws://127.0.0.1:{}", port); |
| 110 | 114 | ||