From 26930b07e0e3cb1ec83e46cce03ea96b8029876e Mon Sep 17 00:00:00 2001 From: Tangent 128 Date: Sun, 21 Oct 2018 02:22:46 -0400 Subject: [PATCH] Fix `webmetro send` not exiting when stdin ends. --- src/commands/filter.rs | 2 +- src/commands/send.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/filter.rs b/src/commands/filter.rs index 76b8575..41fc9ee 100644 --- a/src/commands/filter.rs +++ b/src/commands/filter.rs @@ -38,7 +38,7 @@ pub fn run(args: &ArgMatches) -> Result<(), WebmetroError> { chunk_stream = Box::new(chunk_stream.throttle()); } - Runtime::new().unwrap().block_on_all(chunk_stream.for_each(|chunk| { + Runtime::new().unwrap().block_on(chunk_stream.for_each(|chunk| { io::stdout().write_all(chunk.as_ref()).map_err(WebmetroError::IoError) })) } diff --git a/src/commands/send.rs b/src/commands/send.rs index cd6f3b8..03467f3 100644 --- a/src/commands/send.rs +++ b/src/commands/send.rs @@ -72,5 +72,5 @@ pub fn run(args: &ArgMatches) -> Result<(), WebmetroError> { }) .map_err(WebmetroError::from_err); - Runtime::new().unwrap().block_on_all(future) + Runtime::new().unwrap().block_on(future) }