Skip to content

Commit

Permalink
use unwrap_or_default() rather than `.unwrap_or_else(|| "".to_strin…
Browse files Browse the repository at this point in the history
…g())` (#1354)
  • Loading branch information
demoray authored Sep 5, 2023
1 parent 74fa0e3 commit 40579f6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sdk/storage/src/shared_access_signature/service_sas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40579f6

Please sign in to comment.