upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/grasp-audit/src/fixtures.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-11 16:53:03 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-11 16:53:03 +0000
commit2a9160836bb87fdea3ae891563b0169c68d1c2ab (patch)
tree583c890687beaf7f380fc0be131bdf17485f06fa /grasp-audit/src/fixtures.rs
parent52489d3b1a7d79e164b4cc901b53fd06c05ce1b1 (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 'grasp-audit/src/fixtures.rs')
-rw-r--r--grasp-audit/src/fixtures.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/grasp-audit/src/fixtures.rs b/grasp-audit/src/fixtures.rs
index 174f83d..a15bd79 100644
--- a/grasp-audit/src/fixtures.rs
+++ b/grasp-audit/src/fixtures.rs
@@ -1973,11 +1973,11 @@ mod tests {
1973 1973
1974 #[test] 1974 #[test]
1975 fn test_context_mode_from_audit_mode() { 1975 fn test_context_mode_from_audit_mode() {
1976 assert_eq!(ContextMode::from(AuditMode::Isolated), ContextMode::Isolated);
1977 assert_eq!( 1976 assert_eq!(
1978 ContextMode::from(AuditMode::Shared), 1977 ContextMode::from(AuditMode::Isolated),
1979 ContextMode::Shared 1978 ContextMode::Isolated
1980 ); 1979 );
1980 assert_eq!(ContextMode::from(AuditMode::Shared), ContextMode::Shared);
1981 } 1981 }
1982 1982
1983 #[test] 1983 #[test]