diff --git a/crates/protos/src/artifact_inventory.rs b/crates/protos/src/artifact_inventory.rs index c56877e01..015e2b04d 100644 --- a/crates/protos/src/artifact_inventory.rs +++ b/crates/protos/src/artifact_inventory.rs @@ -236,9 +236,7 @@ mod tests { }; let frame = ArtifactInventoryFrame { sequence: 0, - payload: Some(Payload::Entries(ArtifactInventoryEntries { - versions: vec![entry.clone()], - })), + payload: Some(Payload::Entries(ArtifactInventoryEntries { versions: vec![entry] })), response_proof: vec![1; 32].into(), }; let canonical = canonical_frame(&baseline, &frame).expect("baseline frame"); diff --git a/crates/protos/src/lib.rs b/crates/protos/src/lib.rs index 4d4ce1a32..55fea9b9d 100644 --- a/crates/protos/src/lib.rs +++ b/crates/protos/src/lib.rs @@ -1927,7 +1927,7 @@ mod disk_mutation_canonical_tests { ); let signed = SealArtifactAttemptPutsResponse { response_proof: vec![9; 32].into(), - ..baseline.clone() + ..baseline }; assert_eq!( canonical_seal_artifact_attempt_puts_response_body(&request, &signed).expect("proof exclusion"), @@ -2063,7 +2063,7 @@ mod disk_mutation_canonical_tests { ); let signed = SealArtifactAttemptPutsResponse { response_proof: vec![9; 32].into(), - ..baseline.clone() + ..baseline }; assert_eq!( canonical_seal_artifact_attempt_repairs_response_body(&request, &signed).expect("proof exclusion"), diff --git a/rustfs/src/admin/handlers/plugin_delegation.rs b/rustfs/src/admin/handlers/plugin_delegation.rs index fbc250d80..090777a46 100644 --- a/rustfs/src/admin/handlers/plugin_delegation.rs +++ b/rustfs/src/admin/handlers/plugin_delegation.rs @@ -611,9 +611,7 @@ mod tests { .expect("valid replay request"); assert!(valid_replay_run_input(&input)); for raw in [ - format!( - r#"{{"version":1,"origin_run_id":"00000000-0000-0000-0000-000000000000","idempotency_key":"k","deadline_unix_micros":123}}"# - ), + r#"{"version":1,"origin_run_id":"00000000-0000-0000-0000-000000000000","idempotency_key":"k","deadline_unix_micros":123}"#.to_string(), format!(r#"{{"version":1,"origin_run_id":"{run_id}","idempotency_key":"","deadline_unix_micros":123}}"#), format!(r#"{{"version":1,"origin_run_id":"{run_id}","idempotency_key":"k","deadline_unix_micros":0}}"#), format!( diff --git a/rustfs/src/storage/rpc/node_service/disk.rs b/rustfs/src/storage/rpc/node_service/disk.rs index 35b253ec3..3fc72b79c 100644 --- a/rustfs/src/storage/rpc/node_service/disk.rs +++ b/rustfs/src/storage/rpc/node_service/disk.rs @@ -4828,8 +4828,7 @@ mod legacy_artifact_tests { captured .begin_legacy_local_path_delete(&disk_ref, "path-instance", LegacyPathDeleteOperation::Delete, None) .await - .err() - .expect("captured bootstrap cannot upgrade"), + .expect_err("captured bootstrap cannot upgrade"), DiskError::FileAccessDenied ); } @@ -5790,8 +5789,7 @@ mod legacy_artifact_tests { captured .begin_legacy_local_part_mutation(&disk_ref, source, fixture.destination(), stage.operation()) .await - .err() - .expect("captured bootstrap cannot upgrade"), + .expect_err("captured bootstrap cannot upgrade"), DiskError::FileAccessDenied ); let admitted = ready @@ -6335,8 +6333,7 @@ mod legacy_artifact_tests { captured .begin_legacy_local_rename_file(&disk_ref, source, destination, true) .await - .err() - .expect("captured bootstrap cannot upgrade"), + .expect_err("captured bootstrap cannot upgrade"), DiskError::FileAccessDenied ); let admitted = ready @@ -6876,7 +6873,7 @@ mod legacy_artifact_tests { else { panic!("typed inspection reply"); }; - assert_eq!(serde_json::to_value(&state.state).expect("serialized recovery state"), "NewPrepared"); + assert_eq!(serde_json::to_value(state.state).expect("serialized recovery state"), "NewPrepared"); assert_eq!(state.current_digest, state.journal.as_ref().expect("durable journal").target_digest); assert!(!physical.join("xl.meta").exists(), "real selected version was removed"); assert_ne!(path_delete_snapshot(physical), *before, "forward operation must change physical state"); @@ -6895,7 +6892,7 @@ mod legacy_artifact_tests { else { panic!("typed rollback reply"); }; - assert_eq!(serde_json::to_value(&restored.state).expect("serialized recovery state"), "Absent"); + assert_eq!(serde_json::to_value(restored.state).expect("serialized recovery state"), "Absent"); assert_eq!( path_delete_snapshot(physical), *before, diff --git a/rustfs/src/storage/rpc/node_service/inventory_tests.rs b/rustfs/src/storage/rpc/node_service/inventory_tests.rs index 6d1da1ea6..c00c7ae3b 100644 --- a/rustfs/src/storage/rpc/node_service/inventory_tests.rs +++ b/rustfs/src/storage/rpc/node_service/inventory_tests.rs @@ -256,8 +256,7 @@ async fn artifact_inventory_remote_stream_requires_signed_completion() { let error = client .inventory_artifact_attempt(request) .await - .err() - .expect("body-unbound or tampered request rejected over real HMAC transport"); + .expect_err("body-unbound or tampered request rejected over real HMAC transport"); assert_eq!(error.code(), tonic::Code::PermissionDenied); } let (result, frames) = scan(&fixture, ArtifactInventoryPhase::ArtifactInventoryScan, Duration::from_secs(30)).await;