From bf518212389f383d7065d04a5cb5eb3e9b06b65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BChmel?= Date: Sun, 17 Nov 2019 21:31:41 +0100 Subject: [PATCH] Fix the `def_str_attr!` macro (#319) --- src/style/macros.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/style/macros.rs b/src/style/macros.rs index 64ed5ed..c99f2e8 100644 --- a/src/style/macros.rs +++ b/src/style/macros.rs @@ -35,10 +35,13 @@ macro_rules! def_str_color { } macro_rules! def_str_attr { - ($name:ident => $color:path) => { + ($name:ident => $attr:path) => { fn $name(self) -> StyledContent<&'static str> { StyledContent::new( - Default::default(), + ContentStyle { + attributes: vec![ $attr ], + ..Default::default() + }, self ) }