Skip to content

Commit eaf47f2

Browse files
author
wuliang
committed
fix
1 parent 1340615 commit eaf47f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dragonfly-client/src/grpc/dfdaemon_download.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl DfdaemonDownload for DfdaemonDownloadServerHandler {
269269
// Format: algorithm can be [a-z0-9+._-]+, encoded can be [a-zA-Z0-9=_-]+
270270
// If it's a digest, use BlobDigestBased to ensure SHA256 hash is calculated
271271
// from the digest content, regardless of the digest algorithm used.
272-
let is_digest = content.split_once(':').map_or(false, |(alg, enc)| {
272+
let is_digest = content.split_once(':').is_some_and(|(alg, enc)| {
273273
// Validate algorithm: [a-z0-9+._-]+
274274
!alg.is_empty()
275275
&& alg.chars().all(|c| {

dragonfly-client/src/grpc/dfdaemon_upload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ impl DfdaemonUpload for DfdaemonUploadServerHandler {
266266
// Format: algorithm can be [a-z0-9+._-]+, encoded can be [a-zA-Z0-9=_-]+
267267
// If it's a digest, use BlobDigestBased to ensure SHA256 hash is calculated
268268
// from the digest content, regardless of the digest algorithm used.
269-
let is_digest = content.split_once(':').map_or(false, |(alg, enc)| {
269+
let is_digest = content.split_once(':').is_some_and(|(alg, enc)| {
270270
// Validate algorithm: [a-z0-9+._-]+
271271
!alg.is_empty()
272272
&& alg.chars().all(|c| {

0 commit comments

Comments
 (0)