mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 05:52:23 -05:00
Use a green color on successful run
This commit is contained in:
parent
d0fcd8ae8a
commit
ee7d976283
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
use anyhow::{bail, Result};
|
use anyhow::{bail, Result};
|
||||||
|
use crossterm::style::Stylize;
|
||||||
use std::io::{stdout, Write};
|
use std::io::{stdout, Write};
|
||||||
|
|
||||||
use crate::exercise::Exercise;
|
use crate::exercise::Exercise;
|
||||||
|
@ -21,8 +22,7 @@ pub fn run(exercise: &Exercise) -> Result<()> {
|
||||||
bail!("Ran {exercise} with errors");
|
bail!("Ran {exercise} with errors");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Color
|
println!("{}", "✓ Successfully ran {exercise}".green());
|
||||||
println!("Successfully ran {exercise}");
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue