summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-07-31 17:11:37 -0400
committerGitHub <noreply@github.com>2019-07-31 17:11:37 -0400
commit3971dcfe10b94e901a224b5328a9dafd1e2ecc08 (patch)
treee347644a90094774e56e9315119c31594ca60796 /cli/main.rs
parentb3541c38f5672ffb4a29d66dca19d88b9ecae478 (diff)
Use system rustfmt instead of fixed binary (#2701)
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs18
1 files changed, 12 insertions, 6 deletions
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<String>) {
.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<String>) {
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<String>) {
.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<String>) {
js_check(result);
Ok(())
})
- }).map_err(print_err_and_exit)
+ })
+ .map_err(print_err_and_exit)
});
if use_current_thread {