Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rylev committed Jun 17, 2022
1 parent f9f6946 commit 3ed2196
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
4 changes: 2 additions & 2 deletions sdk/identity/src/device_code_flow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mod device_code_responses;
use async_timer::timer::new_timer;
use azure_core::{
content_type,
error::{Error, ErrorKind, Result, ResultExt},
error::{Error, ErrorKind, Result},
headers, HttpClient, Request, Response,
};
pub use device_code_responses::*;
Expand Down Expand Up @@ -171,7 +171,7 @@ async fn post_form(
url: &str,
form_body: String,
) -> Result<Response> {
let url = Url::parse(url).map_kind(ErrorKind::DataConversion)?;
let url = Url::parse(url)?;
let mut req = Request::new(url, Method::POST);
req.headers_mut().insert(
headers::CONTENT_TYPE,
Expand Down
12 changes: 3 additions & 9 deletions sdk/storage/src/account/operations/get_account_information.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,9 @@ impl GetAccountInformationBuilder {
.storage_account_client()
.blob_storage_request("", http::Method::GET);

// TODO: add the query pairs
request
.url_mut()
.query_pairs_mut()
.append_pair("restype", "account");
request
.url_mut()
.query_pairs_mut()
.append_pair("comp", "properties");
for (k, v) in [("restype", "account"), ("comp", "properties")].iter() {
request.url_mut().query_pairs_mut().append_pair(k, v);
}

let response = self
.storage_client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ impl Policy for SharedKeyAuthorizationPolicy {
HeaderValue::from_str("2019-12-12")?,
); // TODO: Remove duplication with storage_account_client.rs

let url = url::Url::parse(&request.url().to_string()).unwrap();
let auth = generate_authorization(
request.headers(),
&url,
request.url(),
&request.method(),
&self.credential.account_name,
&self.credential.account_key,
Expand Down

0 comments on commit 3ed2196

Please sign in to comment.