From e03a98cbf6491dcf36e8a96fda20764bc1e1748e Mon Sep 17 00:00:00 2001 From: liv Date: Wed, 9 Jan 2019 20:33:58 +0100 Subject: rustfmt --- src/run.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/run.rs') diff --git a/src/run.rs b/src/run.rs index 9605370..093d1e4 100644 --- a/src/run.rs +++ b/src/run.rs @@ -1,7 +1,7 @@ +use crate::util::clean; use console::{style, Emoji}; use indicatif::ProgressBar; use std::process::Command; -use crate::util::clean; pub fn run(matches: clap::ArgMatches) { if let Some(filename) = matches.value_of("file") { @@ -16,19 +16,17 @@ pub fn run(matches: clap::ArgMatches) { if compilecmd.status.success() { let runcmd = Command::new("./temp").output().expect("fail"); bar.finish_and_clear(); - + if runcmd.status.success() { println!("{}", String::from_utf8_lossy(&runcmd.stdout)); - let formatstr = - format!("{} Successfully ran {}", Emoji("✅", "✓"), filename); + let formatstr = format!("{} Successfully ran {}", Emoji("✅", "✓"), filename); println!("{}", style(formatstr).green()); clean(); } else { println!("{}", String::from_utf8_lossy(&runcmd.stdout)); println!("{}", String::from_utf8_lossy(&runcmd.stderr)); - - let formatstr = - format!("{} Ran {} with errors", Emoji("⚠️ ", "!"), filename); + + let formatstr = format!("{} Ran {} with errors", Emoji("⚠️ ", "!"), filename); println!("{}", style(formatstr).red()); clean(); } -- cgit v1.2.3