summaryrefslogtreecommitdiffstats
path: root/ipfs-cli/src/command/files.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ipfs-cli/src/command/files.rs')
-rw-r--r--ipfs-cli/src/command/files.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/ipfs-cli/src/command/files.rs b/ipfs-cli/src/command/files.rs
index 1f1564e..9b109c7 100644
--- a/ipfs-cli/src/command/files.rs
+++ b/ipfs-cli/src/command/files.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 files =>
@@ -66,7 +65,6 @@ pub fn signature<'a, 'b>() -> App<'a, 'b> {
)
}
-
pub fn handle(core: &mut Core, client: &IpfsClient, args: &ArgMatches) {
match args.subcommand() {
("cp", Some(args)) => {
@@ -125,9 +123,9 @@ pub fn handle(core: &mut Core, client: &IpfsClient, args: &ArgMatches) {
}
("read", Some(args)) => {
let path = args.value_of("PATH").unwrap();
- let req = client.files_read(path).for_each(|chunk| {
- io::stdout().write_all(&chunk).map_err(From::from)
- });
+ let req = client
+ .files_read(&path)
+ .for_each(|chunk| io::stdout().write_all(&chunk).map_err(From::from));
core.run(req).expect(EXPECTED_API);
}