summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerris Tseng <ferristseng@fastmail.fm>2018-03-08 15:19:42 -0500
committerFerris Tseng <ferristseng@fastmail.fm>2018-03-08 15:19:42 -0500
commitee3d0fdc5556e52d70c85d3ba795c3e1cbba9e3a (patch)
tree3a66ded3928c9ebcb8c29d080c3515efd5269f78
parent7bc3f5079aa26cc18e00d49d0add9dc9c13f4e63 (diff)
formatting
-rw-r--r--ipfs-api/src/response/bitswap.rs9
-rw-r--r--ipfs-api/src/response/bootstrap.rs9
-rw-r--r--ipfs-api/src/response/commands.rs9
-rw-r--r--ipfs-api/src/response/dag.rs6
-rw-r--r--ipfs-api/src/response/dht.rs15
-rw-r--r--ipfs-api/src/response/file.rs6
-rw-r--r--ipfs-api/src/response/files.rs9
-rw-r--r--ipfs-api/src/response/filestore.rs3
-rw-r--r--ipfs-api/src/response/id.rs6
-rw-r--r--ipfs-api/src/response/key.rs3
-rw-r--r--ipfs-api/src/response/log.rs3
-rw-r--r--ipfs-api/src/response/ls.rs9
-rw-r--r--ipfs-api/src/response/mod.rs9
-rw-r--r--ipfs-api/src/response/mount.rs6
-rw-r--r--ipfs-api/src/response/object.rs36
-rw-r--r--ipfs-api/src/response/pin.rs12
-rw-r--r--ipfs-api/src/response/pubsub.rs12
-rw-r--r--ipfs-api/src/response/refs.rs3
-rw-r--r--ipfs-api/src/response/repo.rs3
-rw-r--r--ipfs-api/src/response/swarm.rs21
20 files changed, 125 insertions, 64 deletions
diff --git a/ipfs-api/src/response/bitswap.rs b/ipfs-api/src/response/bitswap.rs
index c1039de..77fa603 100644
--- a/ipfs-api/src/response/bitswap.rs
+++ b/ipfs-api/src/response/bitswap.rs
@@ -25,9 +25,11 @@ pub type BitswapReprovideResponse = ();
pub struct BitswapStatResponse {
pub provide_buf_len: i32,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub wantlist: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub wantlist: Vec<String>,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub peers: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub peers: Vec<String>,
pub blocks_received: u64,
pub data_received: u64,
@@ -42,7 +44,8 @@ pub type BitswapUnwantResponse = ();
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BitswapWantlistResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub keys: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub keys: Vec<String>,
}
#[cfg(test)]
diff --git a/ipfs-api/src/response/bootstrap.rs b/ipfs-api/src/response/bootstrap.rs
index a8477ce..9015cd9 100644
--- a/ipfs-api/src/response/bootstrap.rs
+++ b/ipfs-api/src/response/bootstrap.rs
@@ -11,19 +11,22 @@ use response::serde;
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BootstrapAddDefaultResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub peers: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub peers: Vec<String>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BootstrapListResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub peers: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub peers: Vec<String>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BootstrapRmAllResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub peers: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub peers: Vec<String>,
}
#[cfg(test)]
diff --git a/ipfs-api/src/response/commands.rs b/ipfs-api/src/response/commands.rs
index 261d0c5..4b6c2f5 100644
--- a/ipfs-api/src/response/commands.rs
+++ b/ipfs-api/src/response/commands.rs
@@ -11,7 +11,8 @@ use response::serde;
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CommandsResponseOptions {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub names: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub names: Vec<String>,
}
#[derive(Debug, Deserialize)]
@@ -19,9 +20,11 @@ pub struct CommandsResponseOptions {
pub struct CommandsResponse {
pub name: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub subcommands: Vec<CommandsResponse>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub subcommands: Vec<CommandsResponse>,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub options: Vec<CommandsResponseOptions>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub options: Vec<CommandsResponseOptions>,
}
#[cfg(test)]
diff --git a/ipfs-api/src/response/dag.rs b/ipfs-api/src/response/dag.rs
index 3f801da..3899443 100644
--- a/ipfs-api/src/response/dag.rs
+++ b/ipfs-api/src/response/dag.rs
@@ -15,14 +15,16 @@ pub struct DagIpfsHeader {
pub name: String,
pub size: u64,
- #[serde(deserialize_with = "serde::deserialize_hashmap")] pub cid: HashMap<String, String>,
+ #[serde(deserialize_with = "serde::deserialize_hashmap")]
+ pub cid: HashMap<String, String>,
}
#[derive(Debug, Deserialize)]
pub struct DagGetResponse {
pub data: Option<String>,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub links: Vec<DagIpfsHeader>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub links: Vec<DagIpfsHeader>,
}
#[derive(Debug, Deserialize)]
diff --git a/ipfs-api/src/response/dht.rs b/ipfs-api/src/response/dht.rs
index 44de85d..483880d 100644
--- a/ipfs-api/src/response/dht.rs
+++ b/ipfs-api/src/response/dht.rs
@@ -47,19 +47,24 @@ impl<'de> Deserialize<'de> for DhtType {
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DhtPeerResponse {
- #[serde(rename = "ID")] pub id: String,
+ #[serde(rename = "ID")]
+ pub id: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub addrs: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub addrs: Vec<String>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DhtMessage {
- #[serde(rename = "ID")] pub id: String,
+ #[serde(rename = "ID")]
+ pub id: String,
- #[serde(rename = "Type")] pub typ: DhtType,
+ #[serde(rename = "Type")]
+ pub typ: DhtType,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub responses: Vec<DhtPeerResponse>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub responses: Vec<DhtPeerResponse>,
pub extra: String,
}
diff --git a/ipfs-api/src/response/file.rs b/ipfs-api/src/response/file.rs
index 3b670f7..b169e87 100644
--- a/ipfs-api/src/response/file.rs
+++ b/ipfs-api/src/response/file.rs
@@ -15,9 +15,11 @@ pub struct IpfsDetailedFile {
pub hash: String,
pub size: u64,
- #[serde(rename = "Type")] pub typ: String,
+ #[serde(rename = "Type")]
+ pub typ: String,
- #[serde(default)] pub links: Vec<IpfsHeader>,
+ #[serde(default)]
+ pub links: Vec<IpfsHeader>,
}
#[derive(Debug, Deserialize)]
diff --git a/ipfs-api/src/response/files.rs b/ipfs-api/src/response/files.rs
index 087c0ba..b745f9e 100644
--- a/ipfs-api/src/response/files.rs
+++ b/ipfs-api/src/response/files.rs
@@ -20,7 +20,8 @@ pub struct FilesEntry {
// This is a protocol buffer enum type defined in
// https://github.com/ipfs/go-ipfs/blob/master/unixfs/pb/unixfs.proto ...
// So it might be some other type than u64, but certainly shouldn't be *bigger* than u64.
- #[serde(rename = "Type")] pub typ: u64,
+ #[serde(rename = "Type")]
+ pub typ: u64,
pub size: u64,
pub hash: String,
}
@@ -28,7 +29,8 @@ pub struct FilesEntry {
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct FilesLsResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub entries: Vec<FilesEntry>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub entries: Vec<FilesEntry>,
}
pub type FilesMkdirResponse = ();
@@ -45,7 +47,8 @@ pub struct FilesStatResponse {
pub cumulative_size: u64,
pub blocks: u64,
- #[serde(rename = "Type")] pub typ: String,
+ #[serde(rename = "Type")]
+ pub typ: String,
}
pub type FilesWriteResponse = ();
diff --git a/ipfs-api/src/response/filestore.rs b/ipfs-api/src/response/filestore.rs
index 5b369bc..0ad0474 100644
--- a/ipfs-api/src/response/filestore.rs
+++ b/ipfs-api/src/response/filestore.rs
@@ -9,7 +9,8 @@
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct FilestoreDupsResponse {
- #[serde(rename = "Ref")] pub reference: String,
+ #[serde(rename = "Ref")]
+ pub reference: String,
pub err: String,
}
diff --git a/ipfs-api/src/response/id.rs b/ipfs-api/src/response/id.rs
index 4aca2f6..e993b50 100644
--- a/ipfs-api/src/response/id.rs
+++ b/ipfs-api/src/response/id.rs
@@ -11,11 +11,13 @@ use response::serde;
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct IdResponse {
- #[serde(rename = "ID")] pub id: String,
+ #[serde(rename = "ID")]
+ pub id: String,
pub public_key: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub addresses: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub addresses: Vec<String>,
pub agent_version: String,
pub protocol_version: String,
diff --git a/ipfs-api/src/response/key.rs b/ipfs-api/src/response/key.rs
index 2e3cf67..803642a 100644
--- a/ipfs-api/src/response/key.rs
+++ b/ipfs-api/src/response/key.rs
@@ -18,7 +18,8 @@ pub struct KeyPair {
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct KeyPairList {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub keys: Vec<KeyPair>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub keys: Vec<KeyPair>,
}
pub type KeyGenResponse = KeyPair;
diff --git a/ipfs-api/src/response/log.rs b/ipfs-api/src/response/log.rs
index da3fb34..90ad35f 100644
--- a/ipfs-api/src/response/log.rs
+++ b/ipfs-api/src/response/log.rs
@@ -17,7 +17,8 @@ pub struct LogLevelResponse {
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct LogLsResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub strings: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub strings: Vec<String>,
}
#[cfg(test)]
diff --git a/ipfs-api/src/response/ls.rs b/ipfs-api/src/response/ls.rs
index 8508a37..6a30fb1 100644
--- a/ipfs-api/src/response/ls.rs
+++ b/ipfs-api/src/response/ls.rs
@@ -13,7 +13,8 @@ use response::serde;
pub struct IpfsFile {
pub hash: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub links: Vec<IpfsFileHeader>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub links: Vec<IpfsFileHeader>,
}
#[derive(Deserialize)]
@@ -23,13 +24,15 @@ pub struct IpfsFileHeader {
pub hash: String,
pub size: u64,
- #[serde(rename = "Type")] pub typ: u32,
+ #[serde(rename = "Type")]
+ pub typ: u32,
}
#[derive(Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct LsResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub objects: Vec<IpfsFile>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub objects: Vec<IpfsFile>,
}
#[cfg(test)]
diff --git a/ipfs-api/src/response/mod.rs b/ipfs-api/src/response/mod.rs
index 2f70c28..0f00a80 100644
--- a/ipfs-api/src/response/mod.rs
+++ b/ipfs-api/src/response/mod.rs
@@ -45,17 +45,17 @@ pub use self::version::*;
///
#[cfg(test)]
macro_rules! deserialize_test {
- ($f:ident, $ty:ident) => (
+ ($f: ident, $ty: ident) => {
#[test]
fn $f() {
let raw = include_str!(concat!("tests/", stringify!($f), ".json"));
match ::serde_json::from_str::<super::$ty>(raw) {
Ok(_) => assert!(true),
- Err(e) => assert!(false, format!("failed with error: {}", e))
+ Err(e) => assert!(false, format!("failed with error: {}", e)),
};
}
- )
+ };
}
mod add;
@@ -99,5 +99,6 @@ pub struct IpfsHeader {
pub hash: String,
pub size: u64,
- #[serde(rename = "Type")] pub typ: Option<String>,
+ #[serde(rename = "Type")]
+ pub typ: Option<String>,
}
diff --git a/ipfs-api/src/response/mount.rs b/ipfs-api/src/response/mount.rs
index 94517a2..59f2bf3 100644
--- a/ipfs-api/src/response/mount.rs
+++ b/ipfs-api/src/response/mount.rs
@@ -9,9 +9,11 @@
#[derive(Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct MountResponse {
- #[serde(rename = "IPFS")] pub ipfs: String,
+ #[serde(rename = "IPFS")]
+ pub ipfs: String,
- #[serde(rename = "IPNS")] pub ipns: String,
+ #[serde(rename = "IPNS")]
+ pub ipns: String,
pub fuse_allow_other: bool,
}
diff --git a/ipfs-api/src/response/object.rs b/ipfs-api/src/response/object.rs
index 5bfecb0..b4b82bf 100644
--- a/ipfs-api/src/response/object.rs
+++ b/ipfs-api/src/response/object.rs
@@ -12,19 +12,23 @@ use std::collections::HashMap;
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ObjectDiff {
- #[serde(rename = "Type")] pub typ: u64,
+ #[serde(rename = "Type")]
+ pub typ: u64,
pub path: String,
- #[serde(deserialize_with = "serde::deserialize_hashmap")] pub before: HashMap<String, String>,
+ #[serde(deserialize_with = "serde::deserialize_hashmap")]
+ pub before: HashMap<String, String>,
- #[serde(deserialize_with = "serde::deserialize_hashmap")] pub after: HashMap<String, String>,
+ #[serde(deserialize_with = "serde::deserialize_hashmap")]
+ pub after: HashMap<String, String>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ObjectDiffResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub changes: Vec<ObjectDiff>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub changes: Vec<ObjectDiff>,
}
#[derive(Debug, Deserialize)]
@@ -32,7 +36,8 @@ pub struct ObjectDiffResponse {
pub struct ObjectGetResponse {
pub data: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub links: Vec<IpfsHeader>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub links: Vec<IpfsHeader>,
}
#[derive(Debug, Deserialize)]
@@ -40,7 +45,8 @@ pub struct ObjectGetResponse {
pub struct ObjectLinksResponse {
pub hash: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub links: Vec<IpfsHeader>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub links: Vec<IpfsHeader>,
}
#[derive(Deserialize)]
@@ -48,7 +54,8 @@ pub struct ObjectLinksResponse {
pub struct ObjectNewResponse {
pub hash: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub links: Vec<IpfsHeader>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub links: Vec<IpfsHeader>,
}
#[derive(Deserialize)]
@@ -56,7 +63,8 @@ pub struct ObjectNewResponse {
pub struct ObjectPatchAddLinkResponse {
pub hash: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub links: Vec<IpfsHeader>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub links: Vec<IpfsHeader>,
}
#[derive(Deserialize)]
@@ -64,7 +72,8 @@ pub struct ObjectPatchAddLinkResponse {
pub struct ObjectPatchAppendDataResponse {
pub hash: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub links: Vec<IpfsHeader>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub links: Vec<IpfsHeader>,
}
#[derive(Deserialize)]
@@ -72,7 +81,8 @@ pub struct ObjectPatchAppendDataResponse {
pub struct ObjectPatchRmLinkResponse {
pub hash: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub links: Vec<IpfsHeader>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub links: Vec<IpfsHeader>,
}
#[derive(Deserialize)]
@@ -80,7 +90,8 @@ pub struct ObjectPatchRmLinkResponse {
pub struct ObjectPatchSetDataResponse {
pub hash: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub links: Vec<IpfsHeader>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub links: Vec<IpfsHeader>,
}
#[derive(Deserialize)]
@@ -88,7 +99,8 @@ pub struct ObjectPatchSetDataResponse {
pub struct ObjectPutResponse {
pub hash: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub links: Vec<IpfsHeader>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub links: Vec<IpfsHeader>,
}
#[derive(Debug, Deserialize)]
diff --git a/ipfs-api/src/response/pin.rs b/ipfs-api/src/response/pin.rs
index 4a9ff6e..43b7010 100644
--- a/ipfs-api/src/response/pin.rs
+++ b/ipfs-api/src/response/pin.rs
@@ -12,7 +12,8 @@ use std::collections::HashMap;
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PinAddResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub pins: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub pins: Vec<String>,
pub progress: Option<i32>,
}
@@ -20,19 +21,22 @@ pub struct PinAddResponse {
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PinType {
- #[serde(rename = "Type")] pub typ: String,
+ #[serde(rename = "Type")]
+ pub typ: String,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PinLsResponse {
- #[serde(deserialize_with = "serde::deserialize_hashmap")] pub keys: HashMap<String, PinType>,
+ #[serde(deserialize_with = "serde::deserialize_hashmap")]
+ pub keys: HashMap<String, PinType>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PinRmResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub pins: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub pins: Vec<String>,
}
#[cfg(test)]
diff --git a/ipfs-api/src/response/pubsub.rs b/ipfs-api/src/response/pubsub.rs
index 20621e1..1580e82 100644
--- a/ipfs-api/src/response/pubsub.rs
+++ b/ipfs-api/src/response/pubsub.rs
@@ -11,13 +11,15 @@ use response::serde;
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PubsubLsResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub strings: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub strings: Vec<String>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PubsubPeersResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub strings: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub strings: Vec<String>,
}
pub type PubsubPubResponse = ();
@@ -28,9 +30,11 @@ pub struct PubsubSubResponse {
pub data: Option<String>,
pub seqno: Option<String>,
- #[serde(rename = "topicIDs")] pub topic_ids: Option<Vec<String>>,
+ #[serde(rename = "topicIDs")]
+ pub topic_ids: Option<Vec<String>>,
- #[serde(rename = "XXX_unrecognized")] pub unrecognized: Option<Vec<u8>>,
+ #[serde(rename = "XXX_unrecognized")]
+ pub unrecognized: Option<Vec<u8>>,
}
#[cfg(test)]
diff --git a/ipfs-api/src/response/refs.rs b/ipfs-api/src/response/refs.rs
index c54dd53..6f66cf0 100644
--- a/ipfs-api/src/response/refs.rs
+++ b/ipfs-api/src/response/refs.rs
@@ -9,7 +9,8 @@
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RefsLocalResponse {
- #[serde(rename = "Ref")] pub reference: String,
+ #[serde(rename = "Ref")]
+ pub reference: String,
pub err: String,
}
diff --git a/ipfs-api/src/response/repo.rs b/ipfs-api/src/response/repo.rs
index 9e31eb1..7037c79 100644
--- a/ipfs-api/src/response/repo.rs
+++ b/ipfs-api/src/response/repo.rs
@@ -18,7 +18,8 @@ pub struct RepoFsckResponse {
#[derive(Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RepoGcResponse {
- #[serde(deserialize_with = "serde::deserialize_hashmap")] pub key: HashMap<String, String>,
+ #[serde(deserialize_with = "serde::deserialize_hashmap")]
+ pub key: HashMap<String, String>,
pub error: Option<String>,
}
diff --git a/ipfs-api/src/response/swarm.rs b/ipfs-api/src/response/swarm.rs
index ba79614..0bd81a3 100644
--- a/ipfs-api/src/response/swarm.rs
+++ b/ipfs-api/src/response/swarm.rs
@@ -11,31 +11,36 @@ use response::serde;
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SwarmAddrsLocalResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub strings: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub strings: Vec<String>,
}
#[derive(Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SwarmAddrsConnectResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub strings: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub strings: Vec<String>,
}
#[derive(Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SwarmAddrsDisconnectResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub strings: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub strings: Vec<String>,
}
#[derive(Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SwarmFiltersAddResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub strings: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub strings: Vec<String>,
}
#[derive(Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SwarmFiltersRmResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub strings: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub strings: Vec<String>,
}
#[derive(Debug, Deserialize)]
@@ -52,13 +57,15 @@ pub struct SwarmPeer {
pub latency: String,
pub muxer: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub streams: Vec<SwarmPeerStream>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub streams: Vec<SwarmPeerStream>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SwarmPeersResponse {
- #[serde(deserialize_with = "serde::deserialize_vec")] pub peers: Vec<SwarmPeer>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub peers: Vec<SwarmPeer>,
}
#[cfg(test)]