From 40579f6c5954ca9b90001a137a7072f7600b3b29 Mon Sep 17 00:00:00 2001 From: Brian Caswell Date: Tue, 5 Sep 2023 17:21:01 -0400 Subject: [PATCH] use `unwrap_or_default()` rather than `.unwrap_or_else(|| "".to_string())` (#1354) --- sdk/storage/src/shared_access_signature/service_sas.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk/storage/src/shared_access_signature/service_sas.rs b/sdk/storage/src/shared_access_signature/service_sas.rs index 850fd0282a..09611ad9dd 100644 --- a/sdk/storage/src/shared_access_signature/service_sas.rs +++ b/sdk/storage/src/shared_access_signature/service_sas.rs @@ -144,9 +144,7 @@ impl BlobSharedAccessSignature { .unwrap_or(&"".to_string()) .to_string(), self.ip.as_ref().unwrap_or(&"".to_string()).to_string(), - self.protocol - .map(|x| x.to_string()) - .unwrap_or_else(|| "".to_string()), + self.protocol.map(|x| x.to_string()).unwrap_or_default(), SERVICE_SAS_VERSION.to_string(), self.resource.to_string(), "".to_string(), // snapshot time