diff options
Diffstat (limited to 'ipfs-cli/src/command/cat.rs')
-rw-r--r-- | ipfs-cli/src/command/cat.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ipfs-cli/src/command/cat.rs b/ipfs-cli/src/command/cat.rs index 5bab711..1f77306 100644 --- a/ipfs-cli/src/command/cat.rs +++ b/ipfs-cli/src/command/cat.rs @@ -13,7 +13,6 @@ use ipfs_api::IpfsClient; use std::io::{self, Write}; use tokio_core::reactor::Core; - pub fn signature<'a, 'b>() -> App<'a, 'b> { clap_app!( @subcommand cat => @@ -22,12 +21,11 @@ pub fn signature<'a, 'b>() -> App<'a, 'b> { ) } - pub fn handle(core: &mut Core, client: &IpfsClient, args: &ArgMatches) { let path = args.value_of("PATH").unwrap(); - let req = client.cat(path).for_each(|chunk| { - io::stdout().write_all(&chunk).map_err(From::from) - }); + let req = client + .cat(&path) + .for_each(|chunk| io::stdout().write_all(&chunk).map_err(From::from)); core.run(req).expect(EXPECTED_API); } |