diff options
author | Sameer Puri <11097096+sameer@users.noreply.github.com> | 2018-12-31 16:37:03 -0500 |
---|---|---|
committer | Sameer Puri <11097096+sameer@users.noreply.github.com> | 2018-12-31 16:37:03 -0500 |
commit | 74245c7a9500be16d47a71753170bcc183c067db (patch) | |
tree | 97b46d413a57b841793b33e58d0f82d3d44aa717 /ipfs-api/src/client.rs | |
parent | 2704d2b28996808fe4d20138034e1af81ddc8b0e (diff) |
Fix clippy warnings
Diffstat (limited to 'ipfs-api/src/client.rs')
-rw-r--r-- | ipfs-api/src/client.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipfs-api/src/client.rs b/ipfs-api/src/client.rs index 2613541..e7f7d5b 100644 --- a/ipfs-api/src/client.rs +++ b/ipfs-api/src/client.rs @@ -107,9 +107,9 @@ impl IpfsClient { #[inline] fn build_error_from_body(chunk: Chunk) -> Error { match serde_json::from_slice(&chunk) { - Ok(e) => Error::Api(e).into(), + Ok(e) => Error::Api(e), Err(_) => match String::from_utf8(chunk.to_vec()) { - Ok(s) => Error::Uncategorized(s).into(), + Ok(s) => Error::Uncategorized(s), Err(e) => e.into(), }, } @@ -310,7 +310,7 @@ impl IpfsClient { // There was an unrecognized trailer value. If that is the case, // create a stream that immediately errors. // - return Box::new(stream::once(Err(err.into()))); + return Box::new(stream::once(Err(err))); } } else { false |