Skip to content

Commit a22ed8e

Browse files
committed
refactor(harness): Move style out
1 parent 3d5eabb commit a22ed8e

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

crates/libtest2-harness/src/notify/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ mod json;
33
#[cfg(feature = "junit")]
44
mod junit;
55
mod pretty;
6+
mod style;
67
mod summary;
78
mod terse;
89

@@ -11,6 +12,7 @@ pub(crate) use json::*;
1112
#[cfg(feature = "junit")]
1213
pub(crate) use junit::*;
1314
pub(crate) use pretty::*;
15+
pub(crate) use style::*;
1416
pub(crate) use summary::*;
1517
pub(crate) use terse::*;
1618

@@ -96,10 +98,3 @@ impl From<Elapsed> for String {
9698
elapsed.0.as_secs_f64().to_string()
9799
}
98100
}
99-
100-
const FAILED: anstyle::Style =
101-
anstyle::Style::new().fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Red)));
102-
const OK: anstyle::Style =
103-
anstyle::Style::new().fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Green)));
104-
const IGNORED: anstyle::Style =
105-
anstyle::Style::new().fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Yellow)));
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pub(crate) const FAILED: anstyle::Style =
2+
anstyle::Style::new().fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Red)));
3+
pub(crate) const OK: anstyle::Style =
4+
anstyle::Style::new().fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Green)));
5+
pub(crate) const IGNORED: anstyle::Style =
6+
anstyle::Style::new().fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Yellow)));

0 commit comments

Comments
 (0)