diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-19 17:01:36 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-19 17:01:36 +0000 |
| commit | bf7f4d5381203d5c27b2811d62c5b1781533aa2b (patch) | |
| tree | 26903bbf535d83abd7242370d8b6932eb80e3389 /grasp-audit/examples | |
| parent | fa065ad128882755f2a988d6203b59a2ab5e38ff (diff) | |
fix some clippy fmt warnings
Diffstat (limited to 'grasp-audit/examples')
| -rw-r--r-- | grasp-audit/examples/simple_audit.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/grasp-audit/examples/simple_audit.rs b/grasp-audit/examples/simple_audit.rs index 411477c..e363d5c 100644 --- a/grasp-audit/examples/simple_audit.rs +++ b/grasp-audit/examples/simple_audit.rs | |||
| @@ -8,12 +8,12 @@ use grasp_audit::*; | |||
| 8 | async fn main() -> Result<()> { | 8 | async fn main() -> Result<()> { |
| 9 | // Create audit config for CI testing | 9 | // Create audit config for CI testing |
| 10 | let config = AuditConfig::ci(); | 10 | let config = AuditConfig::ci(); |
| 11 | 11 | ||
| 12 | println!("GRASP Audit Example"); | 12 | println!("GRASP Audit Example"); |
| 13 | println!("=================="); | 13 | println!("=================="); |
| 14 | println!("Audit Run ID: {}", config.run_id); | 14 | println!("Audit Run ID: {}", config.run_id); |
| 15 | println!(); | 15 | println!(); |
| 16 | 16 | ||
| 17 | // Connect to relay | 17 | // Connect to relay |
| 18 | println!("Connecting to relay at ws://localhost:7000..."); | 18 | println!("Connecting to relay at ws://localhost:7000..."); |
| 19 | let client = match AuditClient::new("ws://localhost:7000", config).await { | 19 | let client = match AuditClient::new("ws://localhost:7000", config).await { |
| @@ -26,28 +26,28 @@ async fn main() -> Result<()> { | |||
| 26 | return Err(e); | 26 | return Err(e); |
| 27 | } | 27 | } |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | if !client.is_connected().await { | 30 | if !client.is_connected().await { |
| 31 | eprintln!("Not connected to relay"); | 31 | eprintln!("Not connected to relay"); |
| 32 | return Err(anyhow!("Connection failed")); | 32 | return Err(anyhow!("Connection failed")); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | println!("✓ Connected"); | 35 | println!("✓ Connected"); |
| 36 | println!(); | 36 | println!(); |
| 37 | 37 | ||
| 38 | // Run NIP-01 smoke tests | 38 | // Run NIP-01 smoke tests |
| 39 | println!("Running NIP-01 smoke tests..."); | 39 | println!("Running NIP-01 smoke tests..."); |
| 40 | println!(); | 40 | println!(); |
| 41 | 41 | ||
| 42 | let results = specs::Nip01SmokeTests::run_all(&client).await; | 42 | let results = specs::Nip01SmokeTests::run_all(&client).await; |
| 43 | 43 | ||
| 44 | // Print results | 44 | // Print results |
| 45 | results.print_report(); | 45 | results.print_report(); |
| 46 | 46 | ||
| 47 | // Exit with error if tests failed | 47 | // Exit with error if tests failed |
| 48 | if !results.all_passed() { | 48 | if !results.all_passed() { |
| 49 | std::process::exit(1); | 49 | std::process::exit(1); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | Ok(()) | 52 | Ok(()) |
| 53 | } | 53 | } |