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 a4b0a92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 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 Expand Up @@ -727,7 +730,6 @@ impl Client {
&self.http_client
}


///
/// # Errors
pub async fn friendbot_url(&self) -> Result<String, Error> {
Expand Down

0 comments on commit a4b0a92

Please sign in to comment.