cleanup
Error::from is already a function taking 1 parameter, there's no need to wrap it with `|e| Error::from(e)`. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -43,12 +43,12 @@ impl HttpClient {
|
||||
|
||||
let future = client
|
||||
.request(request)
|
||||
.map_err(|e| Error::from(e))
|
||||
.map_err(Error::from)
|
||||
.and_then(|resp| {
|
||||
|
||||
let status = resp.status();
|
||||
|
||||
resp.into_body().concat2().map_err(|e| Error::from(e))
|
||||
resp.into_body().concat2().map_err(Error::from)
|
||||
.and_then(move |data| {
|
||||
|
||||
let text = String::from_utf8(data.to_vec()).unwrap();
|
||||
|
Reference in New Issue
Block a user