From 3971dcfe10b94e901a224b5328a9dafd1e2ecc08 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 31 Jul 2019 17:11:37 -0400 Subject: Use system rustfmt instead of fixed binary (#2701) --- cli/main.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'cli/main.rs') diff --git a/cli/main.rs b/cli/main.rs index fb34a2c76..d8d834e8f 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -131,7 +131,8 @@ pub fn print_file_info( debug!("compiler error exiting!"); eprintln!("\n{}", e.to_string()); std::process::exit(1); - }).and_then(move |compiled| { + }) + .and_then(move |compiled| { if out.media_type == msg::MediaType::TypeScript || (out.media_type == msg::MediaType::JavaScript && state_.ts_compiler.compile_js) @@ -236,7 +237,8 @@ fn fetch_or_info_command( } else { future::Either::B(future::ok(worker)) } - }).and_then(|worker| { + }) + .and_then(|worker| { worker.then(|result| { js_check(result); Ok(()) @@ -290,7 +292,8 @@ fn xeval_command(flags: DenoFlags, argv: Vec) { .then(|result| { js_check(result); Ok(()) - }).map_err(print_err_and_exit) + }) + .map_err(print_err_and_exit) }); tokio_util::run(main_future); } @@ -309,7 +312,8 @@ fn bundle_command(flags: DenoFlags, argv: Vec) { debug!("diagnostics returned, exiting!"); eprintln!(""); print_err_and_exit(err); - }).and_then(move |_| { + }) + .and_then(move |_| { debug!(">>>>> bundle_async END"); Ok(()) }); @@ -327,7 +331,8 @@ fn run_repl(flags: DenoFlags, argv: Vec) { .then(|result| { js_check(result); Ok(()) - }).map_err(|(err, _worker): (ErrBox, Worker)| print_err_and_exit(err)) + }) + .map_err(|(err, _worker): (ErrBox, Worker)| print_err_and_exit(err)) }); tokio_util::run(main_future); } @@ -351,7 +356,8 @@ fn run_script(flags: DenoFlags, argv: Vec) { js_check(result); Ok(()) }) - }).map_err(print_err_and_exit) + }) + .map_err(print_err_and_exit) }); if use_current_thread { -- cgit v1.2.3