Skip to content

Commit bbd3c79

Browse files
authored
Panic when there is no ServiceType (#863)
1 parent 5b5e10e commit bbd3c79

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

sdk/storage/src/authorization_policy.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ impl Policy for AuthorizationPolicy {
4242
request.method(),
4343
account,
4444
key,
45-
ctx.get().unwrap_or(&ServiceType::default()),
45+
ctx.get()
46+
.expect("ServiceType must be in the Context at this point"),
4647
);
4748
request.insert_header(AUTHORIZATION, auth)
4849
}

sdk/storage/src/core/clients/storage_account_client.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ pub enum ServiceType {
5959
Table,
6060
}
6161

62-
impl Default for ServiceType {
63-
fn default() -> Self {
64-
Self::Blob
65-
}
66-
}
67-
6862
#[derive(Debug)]
6963
pub struct StorageAccountClient {
7064
storage_credentials: StorageCredentials,

0 commit comments

Comments
 (0)