summaryrefslogtreecommitdiffstats
path: root/ipfs-api/src
diff options
context:
space:
mode:
authorFerris Tseng <ferristseng@fastmail.fm>2017-12-30 20:07:29 -0500
committerFerris Tseng <ferristseng@fastmail.fm>2017-12-30 20:07:29 -0500
commit06a3776548b8c81226ef61715e5a2e98e29799c9 (patch)
tree2b9ad5ea6b7e82b3fa9eb1bb17305957f2038b9b /ipfs-api/src
parent59cf5824d43b4df1054bb633a4fe1c3cb8602c42 (diff)
clippy and formatting
Diffstat (limited to 'ipfs-api/src')
-rw-r--r--ipfs-api/src/client.rs21
-rw-r--r--ipfs-api/src/request/object.rs2
-rw-r--r--ipfs-api/src/request/refs.rs2
-rw-r--r--ipfs-api/src/request/swarm.rs2
-rw-r--r--ipfs-api/src/response/files.rs3
5 files changed, 17 insertions, 13 deletions
diff --git a/ipfs-api/src/client.rs b/ipfs-api/src/client.rs
index dee4a24..4cfcaf1 100644
--- a/ipfs-api/src/client.rs
+++ b/ipfs-api/src/client.rs
@@ -1605,11 +1605,11 @@ impl IpfsClient {
/// Pins a new object.
///
- /// The "recursive" option tells the server whether to
- /// pin just the top-level object, or all sub-objects
+ /// The "recursive" option tells the server whether to
+ /// pin just the top-level object, or all sub-objects
/// it depends on. For most cases you want it to be `true`.
///
- /// Does not yet implement the "progress" agument because
+ /// Does not yet implement the "progress" agument because
/// reading it is kinda squirrelly.
///
/// # Examples
@@ -1628,12 +1628,15 @@ impl IpfsClient {
/// # }
/// ```
#[inline]
- pub fn pin_add(
- &self,
- key: &str,
- recursive: bool
- ) -> AsyncResponse<response::PinAddResponse> {
- self.request(&request::PinAdd { key, recursive: Some(recursive), progress: false }, None)
+ pub fn pin_add(&self, key: &str, recursive: bool) -> AsyncResponse<response::PinAddResponse> {
+ self.request(
+ &request::PinAdd {
+ key,
+ recursive: Some(recursive),
+ progress: false,
+ },
+ None,
+ )
}
/// Returns a list of pinned objects in local storage.
diff --git a/ipfs-api/src/request/object.rs b/ipfs-api/src/request/object.rs
index 3e4da29..c9b3a51 100644
--- a/ipfs-api/src/request/object.rs
+++ b/ipfs-api/src/request/object.rs
@@ -41,7 +41,7 @@ pub struct ObjectLinks<'a> {
}
impl<'a> ApiRequest for ObjectLinks<'a> {
- const PATH: &'static str = "/object/links";
+ const PATH: &'static str = "/object/links";
}
diff --git a/ipfs-api/src/request/refs.rs b/ipfs-api/src/request/refs.rs
index 484869f..1e7c6f4 100644
--- a/ipfs-api/src/request/refs.rs
+++ b/ipfs-api/src/request/refs.rs
@@ -14,5 +14,5 @@ pub struct RefsLocal;
impl_skip_serialize!(RefsLocal);
impl ApiRequest for RefsLocal {
- const PATH: &'static str = "/refs/local";
+ const PATH: &'static str = "/refs/local";
}
diff --git a/ipfs-api/src/request/swarm.rs b/ipfs-api/src/request/swarm.rs
index 3953fdb..c9a8da7 100644
--- a/ipfs-api/src/request/swarm.rs
+++ b/ipfs-api/src/request/swarm.rs
@@ -23,5 +23,5 @@ pub struct SwarmPeers;
impl_skip_serialize!(SwarmPeers);
impl ApiRequest for SwarmPeers {
- const PATH: &'static str = "/swarm/peers";
+ const PATH: &'static str = "/swarm/peers";
}
diff --git a/ipfs-api/src/response/files.rs b/ipfs-api/src/response/files.rs
index 1b073de..ae0c7d8 100644
--- a/ipfs-api/src/response/files.rs
+++ b/ipfs-api/src/response/files.rs
@@ -20,7 +20,8 @@ pub type FilesFlushResponse = ();
pub struct FilesEntry {
pub name: String,
- // This is a protocol buffer enum type defined in https://github.com/ipfs/go-ipfs/blob/master/unixfs/pb/unixfs.proto ...
+ // 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,