summaryrefslogtreecommitdiffstats
path: root/ipfs-cli/src/command/block.rs
diff options
context:
space:
mode:
authorFerris Tseng <ferristseng@fastmail.fm>2018-01-23 18:30:11 -0500
committerFerris Tseng <ferristseng@fastmail.fm>2018-01-23 18:30:11 -0500
commitc2f1199de55897cc98d7663f171329a04e63b230 (patch)
tree37d5fcd052f9fce50eacae78633cf09a1c8a9901 /ipfs-cli/src/command/block.rs
parent06a3776548b8c81226ef61715e5a2e98e29799c9 (diff)
formatting
Diffstat (limited to 'ipfs-cli/src/command/block.rs')
-rw-r--r--ipfs-cli/src/command/block.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/ipfs-cli/src/command/block.rs b/ipfs-cli/src/command/block.rs
index 09bc660..7cccb5b 100644
--- a/ipfs-cli/src/command/block.rs
+++ b/ipfs-cli/src/command/block.rs
@@ -14,7 +14,6 @@ use std::fs::File;
use std::io::{self, Write};
use tokio_core::reactor::Core;
-
pub fn signature<'a, 'b>() -> App<'a, 'b> {
clap_app!(
@subcommand block =>
@@ -38,14 +37,13 @@ pub fn signature<'a, 'b>() -> App<'a, 'b> {
)
}
-
pub fn handle(core: &mut Core, client: &IpfsClient, args: &ArgMatches) {
match args.subcommand() {
("get", Some(args)) => {
let key = args.value_of("KEY").unwrap();
- let req = client.block_get(key).for_each(|chunk| {
- io::stdout().write_all(&chunk).map_err(From::from)
- });
+ let req = client
+ .block_get(key)
+ .for_each(|chunk| io::stdout().write_all(&chunk).map_err(From::from));
core.run(req).expect(EXPECTED_API);
}
@@ -81,5 +79,4 @@ pub fn handle(core: &mut Core, client: &IpfsClient, args: &ArgMatches) {
}
_ => unreachable!(),
}
-
}