mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-14 14:12:31 +00:00
log: :doc: unique error output and update comment to fit config
This commit is contained in:
parent
30373d7956
commit
ec77d91952
1 changed files with 14 additions and 0 deletions
|
@ -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].
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue