Skip to content

Commit db62df5

Browse files
whites11claude
andcommitted
fix(catalog,flow): address clippy and golangci-lint warnings
- Rust: remove needless Ok(x?) → x (clippy::needless_question_mark) - Go: use http.NoBody instead of nil request body (gocritic::httpNoBody) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9fa12f7 commit db62df5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

flow/internal/env.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func decryptWithAwsKms(ctx context.Context, data []byte, keyID string) ([]byte,
105105
func decryptWithGcpKms(ctx context.Context, data []byte, keyID string) ([]byte, error) {
106106
// Get access token from GKE Workload Identity metadata server
107107
req, err := http.NewRequestWithContext(ctx, http.MethodGet,
108-
"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token", nil)
108+
"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token", http.NoBody)
109109
if err != nil {
110110
return nil, fmt.Errorf("failed to create metadata request: %w", err)
111111
}

nexus/catalog/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ async fn gcp_kms_decrypt(encrypted_payload: &str, kms_key_id: &str) -> anyhow::R
131131
.decode(plaintext_b64)
132132
.context("failed to decode GCP KMS plaintext")?;
133133

134-
Ok(String::from_utf8(plaintext).context("GCP KMS plaintext is not valid UTF-8")?)
134+
String::from_utf8(plaintext).context("GCP KMS plaintext is not valid UTF-8")
135135
}
136136

137137
#[cfg(not(feature = "gcp"))]

0 commit comments

Comments
 (0)