log: :doc: unique error output and update comment to fit config

This commit is contained in:
zwPapEr 2020-11-28 23:19:50 +08:00 committed by Abin Simon
parent 30373d7956
commit ec77d91952

View file

@ -100,6 +100,20 @@ pub enum IconTheme {
Fancy,
}
impl IconTheme {
/// Get a value from a string.
fn from_str(value: &str) -> Option<Self> {
match value {
"fancy" => Some(Self::Fancy),
"unicode" => Some(Self::Unicode),
_ => {
print_error!("Bad icons.theme config, {}", &value);
None
}
}
}
}
impl Configurable<Self> for IconTheme {
/// Get a potential `IconTheme` variant from [ArgMatches].
///