Fix the def_str_attr! macro (#319)

This commit is contained in:
Lars Mühmel 2019-11-17 21:31:41 +01:00 committed by Timon
parent 9fdc6318b2
commit bf51821238

View File

@ -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
)
}