Add option to specify output color choice

This commit is contained in:
2020-05-22 19:33:06 +02:00
parent 739cae1f7c
commit 499fa0c667
6 changed files with 58 additions and 20 deletions

View File

@@ -28,7 +28,7 @@ pub struct Problem
impl Problem
{
pub fn new() -> Self
pub fn new(color_choice: crate::output::ColorChoice) -> Self
{
Self
{
@@ -37,7 +37,7 @@ impl Problem
statements: std::cell::RefCell::new(std::collections::BTreeMap::new()),
shell: std::cell::RefCell::new(crate::output::Shell::from_stdout()),
shell: std::cell::RefCell::new(crate::output::Shell::from_stdout(color_choice)),
}
}