Remove some more unnecessary 'to_string()' calls (#7190)

This commit is contained in:
Bert Belder 2020-08-26 00:48:25 +02:00
parent 9bfb0df805
commit aead9dc91e
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461
10 changed files with 42 additions and 67 deletions

View file

@ -44,12 +44,9 @@ pub fn create_http_client(ca_file: Option<&str>) -> Result<Client, ErrBox> {
builder = builder.add_root_certificate(cert);
}
builder.build().map_err(|_| {
ErrBox::from(io::Error::new(
io::ErrorKind::Other,
"Unable to build http client".to_string(),
))
})
builder
.build()
.map_err(|_| ErrBox::error("Unable to build http client"))
}
/// Construct the next uri based on base uri and location header fragment
/// See <https://tools.ietf.org/html/rfc3986#section-4.2>