summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-06-14 22:16:39 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-06-14 22:16:39 +0200
commit5ba949ba1b53c43b80361846c5a8a7ac07fe8196 (patch)
treebe8c9dd1679630ab91162d29b5f46ce5793da01a
parent05d5243a2cc4d5fb06f42c31bbb5552aefda8402 (diff)
Fix: do not call into_bytes()
-rw-r--r--src/repository/client.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/repository/client.rs b/src/repository/client.rs
index 013fc08..55ba7c0 100644
--- a/src/repository/client.rs
+++ b/src/repository/client.rs
@@ -39,7 +39,7 @@ pub fn resolve_plain(client: Arc<IpfsClient>, hash: &IPFSHash)
.cat(hash)
.concat2()
.map_err(Error::from)
- .map(|blob| blob.into_bytes().to_vec())
+ .map(|blob| blob.to_vec())
}
pub fn resolve_block(client: Arc<IpfsClient>, hash: &IPFSHash)
@@ -52,7 +52,7 @@ pub fn resolve_block(client: Arc<IpfsClient>, hash: &IPFSHash)
.and_then(|block| {
debug!("Got Block data, building Block object");
- String::from_utf8(block.into_bytes().to_vec())
+ String::from_utf8(block.to_vec())
.map_err(Error::from)
.and_then(|s| serde_json_from_str(&s).map_err(Error::from))
})
@@ -91,7 +91,7 @@ pub fn resolve_content(client: Arc<IpfsClient>, hash: &IPFSHash)
.and_then(|content| {
debug!("Got Content data, building Content object");
- String::from_utf8(content.into_bytes().to_vec())
+ String::from_utf8(content.to_vec())
.map_err(Error::from)
.and_then(|s| serde_json_from_str(&s).map_err(Error::from))
})