refactor: fix lints

pull/24376/head
Dom 2021-01-12 17:23:09 +00:00
parent e06b989fa6
commit ac88b5a92b
2 changed files with 3 additions and 4 deletions

View File

@ -48,7 +48,7 @@ impl ClientBuilder {
.connect_timeout(self.connect_timeout)
.timeout(self.timeout)
.build()
.map_err(|e| Box::new(e))?;
.map_err(Box::new)?;
// Construct a base URL.
//

View File

@ -77,8 +77,7 @@ impl Client {
Ok(r) if r.status() == 200 => Ok(()),
Ok(r) => Err(RequestError::UnexpectedStatusCode {
code: r.status().as_u16(),
}
.into()),
}),
Err(e) => Err(e.into()),
}
}
@ -156,7 +155,7 @@ impl Client {
//
// Paths should be relative so the full base path is used.
debug_assert_ne!(
path.chars().nth(0).unwrap(),
path.chars().next().unwrap(),
'/',
"should not join absolute paths to base URL"
);