10
src/theme.rs
10
src/theme.rs
@@ -10,8 +10,14 @@ macro_rules! load_color {
|
|||||||
$theme
|
$theme
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|t| t.$member.clone())
|
.and_then(|t| t.$member.clone())
|
||||||
.map(|c| Color::parse(c.as_ref()).expect(&format!("Failed to parse color \"{}\"", c)))
|
.and_then(|c| Color::parse(c.as_ref()))
|
||||||
.unwrap_or($default)
|
.unwrap_or_else(|| {
|
||||||
|
warn!(
|
||||||
|
"Failed to parse color in \"{}\", falling back to default",
|
||||||
|
stringify!($member)
|
||||||
|
);
|
||||||
|
$default
|
||||||
|
})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user