Skip to content

Commit 9c607f0

Browse files
committed
Fix clippy lints
1 parent 29208ff commit 9c607f0

File tree

4 files changed

+13
-21
lines changed

4 files changed

+13
-21
lines changed

sdk/identity/examples/device_code_flow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
7878
// using the access token.
7979

8080
let http_client = azure_core::new_http_client();
81-
let storage_client = StorageAccountClient::new_bearer_token(
81+
let storage_account = StorageAccountClient::new_bearer_token(
8282
http_client.clone(),
8383
&storage_account_name,
8484
authorization.access_token().secret() as &str,
8585
)
8686
.as_storage_client();
87-
let blob_service = storage.as_blob_service_client();
87+
let blob_service = storage_account.as_blob_service_client();
8888

8989
// now we enumerate the containers in the
9090
// specified storage account.

sdk/storage_blobs/examples/list_blobs_01.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,12 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
1717
.nth(1)
1818
.expect("please specify container name as command line parameter");
1919

20-
<<<<<<< HEAD
2120
let http_client = azure_core::new_http_client();
2221
let storage_account =
2322
StorageAccountClient::new_access_key(http_client.clone(), &account, &master_key)
2423
.as_storage_client();
25-
let base_blob_service = storage_account.as_base_blob_service();
24+
let blob_service = storage_account.as_blob_service_client();
2625
let container = storage_account.as_container_client(&container_name);
27-
=======
28-
let http_client = new_http_client();
29-
let storage = StorageAccountClient::new_access_key(http_client.clone(), &account, &master_key)
30-
.as_storage_client();
31-
let blob_service = storage.as_blob_service_client();
32-
let container = storage.as_container_client(&container_name);
33-
>>>>>>> Rename BaseBlobService to BlobServiceClient.
3426

3527
let iv = blob_service.list_containers().execute().await?;
3628

sdk/storage_blobs/src/clients/blob_client.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ impl BlobClient {
8989
SetBlobMetadataBuilder::new(self)
9090
}
9191

92-
pub fn update_page<'a>(
93-
&'a self,
92+
pub fn update_page(
93+
&self,
9494
ba512_range: BA512Range,
9595
content: impl Into<Bytes>,
96-
) -> UpdatePageBuilder<'a> {
96+
) -> UpdatePageBuilder {
9797
UpdatePageBuilder::new(self, ba512_range, content)
9898
}
9999

@@ -133,19 +133,19 @@ impl BlobClient {
133133
PutBlockListBuilder::new(self, block_list)
134134
}
135135

136-
pub fn put_block_blob<'a>(&'a self, body: impl Into<Bytes>) -> PutBlockBlobBuilder<'a> {
136+
pub fn put_block_blob(&self, body: impl Into<Bytes>) -> PutBlockBlobBuilder {
137137
PutBlockBlobBuilder::new(self, body.into())
138138
}
139139

140-
pub fn append_block<'a>(&'a self, body: impl Into<Bytes>) -> AppendBlockBuilder<'a> {
140+
pub fn append_block(&self, body: impl Into<Bytes>) -> AppendBlockBuilder {
141141
AppendBlockBuilder::new(self, body.into())
142142
}
143143

144-
pub fn put_block<'a>(
145-
&'a self,
144+
pub fn put_block(
145+
&self,
146146
block_id: impl Into<BlockId>,
147147
body: impl Into<Bytes>,
148-
) -> PutBlockBuilder<'a> {
148+
) -> PutBlockBuilder {
149149
PutBlockBuilder::new(self, block_id, body)
150150
}
151151

sdk/storage_blobs/src/clients/blob_lease_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ impl BlobLeaseClient {
6969
ChangeLeaseBuilder::new(self, proposed_lease_id)
7070
}
7171

72-
pub fn release<'a>(&'a self) -> ReleaseLeaseBuilder {
72+
pub fn release(&self) -> ReleaseLeaseBuilder {
7373
ReleaseLeaseBuilder::new(self)
7474
}
7575

76-
pub fn renew<'a>(&'a self) -> RenewLeaseBuilder {
76+
pub fn renew(&self) -> RenewLeaseBuilder {
7777
RenewLeaseBuilder::new(self)
7878
}
7979

0 commit comments

Comments
 (0)