Skip to content

Commit 7512924

Browse files
committed
Fix clippy warnings
1 parent 229a341 commit 7512924

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nora-registry/src/registry/docker.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ async fn patch_blob(Path((name, uuid)): Path<(String, String)>, body: Bytes) ->
123123
// Append data to the upload session and get total size
124124
let total_size = {
125125
let mut sessions = UPLOAD_SESSIONS.write();
126-
let session = sessions.entry(uuid.clone()).or_insert_with(Vec::new);
126+
let session = sessions.entry(uuid.clone()).or_default();
127127
session.extend_from_slice(&body);
128128
session.len()
129129
};
@@ -262,13 +262,13 @@ async fn put_manifest(
262262

263263
// Store by tag/reference
264264
let key = format!("docker/{}/manifests/{}.json", name, reference);
265-
if let Err(_) = state.storage.put(&key, &body).await {
265+
if state.storage.put(&key, &body).await.is_err() {
266266
return StatusCode::INTERNAL_SERVER_ERROR.into_response();
267267
}
268268

269269
// Also store by digest for direct digest lookups
270270
let digest_key = format!("docker/{}/manifests/{}.json", name, digest);
271-
if let Err(_) = state.storage.put(&digest_key, &body).await {
271+
if state.storage.put(&digest_key, &body).await.is_err() {
272272
return StatusCode::INTERNAL_SERVER_ERROR.into_response();
273273
}
274274

0 commit comments

Comments
 (0)