diff options
Diffstat (limited to 'src/parse')
| -rw-r--r-- | src/parse/mod.rs | 4 | ||||
| -rw-r--r-- | src/parse/tests.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/parse/mod.rs b/src/parse/mod.rs index 261bbabb..04a9de58 100644 --- a/src/parse/mod.rs +++ b/src/parse/mod.rs @@ -487,9 +487,9 @@ fn ident(p: &mut Parser) -> Option<Ident> { /// Parse a color. fn color(p: &mut Parser, hex: &str, start: Pos) -> RgbaColor { RgbaColor::from_str(hex).unwrap_or_else(|_| { - // Heal color by assuming black. + // Replace color with black. p.diag(error!(start .. p.pos(), "invalid color")); - RgbaColor::with_healed(0, 0, 0, 255, true) + RgbaColor::new(0, 0, 0, 255) }) } diff --git a/src/parse/tests.rs b/src/parse/tests.rs index 6d5eee38..1b6df74b 100644 --- a/src/parse/tests.rs +++ b/src/parse/tests.rs @@ -436,7 +436,7 @@ fn test_parse_values() { e!("[val: [hi]]" => ); // Healed colors. - v!("#12345" => Color(RgbaColor::with_healed(0, 0, 0, 0xff, true))); + v!("#12345" => Color(RgbaColor::new(0, 0, 0, 0xff))); e!("[val: #12345]" => s(6, 12, "invalid color")); e!("[val: #a5]" => s(6, 9, "invalid color")); e!("[val: #14b2ah]" => s(6, 13, "invalid color")); |
