Skip to content

Commit 7fa2f87

Browse files
author
liv
committed
make the default output a bit nicer
1 parent e03a98c commit 7fa2f87

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

default_out.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
## Welcome to Rustlings!
2-
31
To get started, run `rustlings verify` in order to get the first exercise.
42
Make sure to have your editor open!

src/main.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,17 @@ fn main() {
3232
let ss = SyntaxSet::load_defaults_newlines();
3333
let ts = ThemeSet::load_defaults();
3434

35-
println!(r#" _ _ _ "#);
36-
println!(r#" _ __ _ _ ___| |_| (_)_ __ __ _ ___ "#);
37-
println!(r#" | '__| | | / __| __| | | '_ \ / _` / __| "#);
38-
println!(r#" | | | |_| \__ \ |_| | | | | | (_| \__ \ "#);
39-
println!(r#" |_| \__,_|___/\__|_|_|_| |_|\__, |___/ "#);
40-
println!(r#" |___/ "#);
41-
println!("");
35+
if None == matches.subcommand_name() {
36+
println!("");
37+
println!(r#" welcome to... "#);
38+
println!(r#" _ _ _ "#);
39+
println!(r#" _ __ _ _ ___| |_| (_)_ __ __ _ ___ "#);
40+
println!(r#" | '__| | | / __| __| | | '_ \ / _` / __| "#);
41+
println!(r#" | | | |_| \__ \ |_| | | | | | (_| \__ \ "#);
42+
println!(r#" |_| \__,_|___/\__|_|_|_| |_|\__, |___/ "#);
43+
println!(r#" |___/ "#);
44+
println!("");
45+
}
4246

4347
if let Some(matches) = matches.subcommand_matches("run") {
4448
run(matches.clone());

0 commit comments

Comments
 (0)