From 7fa2f87c8b47dbb79d4c6e41bdd095e6962270fa Mon Sep 17 00:00:00 2001 From: liv Date: Wed, 9 Jan 2019 20:44:55 +0100 Subject: [PATCH] make the default output a bit nicer --- default_out.md | 2 -- src/main.rs | 18 +++++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/default_out.md b/default_out.md index 7cbdffc..e221d78 100644 --- a/default_out.md +++ b/default_out.md @@ -1,4 +1,2 @@ -## Welcome to Rustlings! - To get started, run `rustlings verify` in order to get the first exercise. Make sure to have your editor open! \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index c229e0b..779e4b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,13 +32,17 @@ fn main() { let ss = SyntaxSet::load_defaults_newlines(); let ts = ThemeSet::load_defaults(); - println!(r#" _ _ _ "#); - println!(r#" _ __ _ _ ___| |_| (_)_ __ __ _ ___ "#); - println!(r#" | '__| | | / __| __| | | '_ \ / _` / __| "#); - println!(r#" | | | |_| \__ \ |_| | | | | | (_| \__ \ "#); - println!(r#" |_| \__,_|___/\__|_|_|_| |_|\__, |___/ "#); - println!(r#" |___/ "#); - println!(""); + if None == matches.subcommand_name() { + println!(""); + println!(r#" welcome to... "#); + println!(r#" _ _ _ "#); + println!(r#" _ __ _ _ ___| |_| (_)_ __ __ _ ___ "#); + println!(r#" | '__| | | / __| __| | | '_ \ / _` / __| "#); + println!(r#" | | | |_| \__ \ |_| | | | | | (_| \__ \ "#); + println!(r#" |_| \__,_|___/\__|_|_|_| |_|\__, |___/ "#); + println!(r#" |___/ "#); + println!(""); + } if let Some(matches) = matches.subcommand_matches("run") { run(matches.clone());