diff --git a/src/lib.rs b/src/lib.rs index c93cf7b..94e09ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1590,6 +1590,13 @@ pub struct ColorSpec { impl Default for ColorSpec { fn default() -> ColorSpec { + ColorSpec::new() + } +} + +impl ColorSpec { + /// Create a new color specification that has no colors or styles. + pub const fn new() -> ColorSpec { ColorSpec { fg_color: None, bg_color: None, @@ -1601,13 +1608,6 @@ impl Default for ColorSpec { reset: true, } } -} - -impl ColorSpec { - /// Create a new color specification that has no colors or styles. - pub fn new() -> ColorSpec { - ColorSpec::default() - } /// Get the foreground color. pub fn fg(&self) -> Option<&Color> {