Skip to content

Commit

Permalink
Clippy & handle uwraps
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Sep 27, 2024
1 parent 01ff185 commit 0fd159b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,12 +693,15 @@ impl Client {
let mut headers = Self::default_http_headers();

for (key, value) in additional_headers {
headers.insert(key.unwrap(), value);
match key {
None => return Err(Error::InvalidResponse),
Some(k) => headers.insert(k, value),
};
}
let http_client = Arc::new(
HttpClientBuilder::default()
.set_headers(headers)
.build(&base_url)?,
.build(base_url)?,
);

client.http_client = http_client;
Expand Down

0 comments on commit 0fd159b

Please sign in to comment.