mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-09 09:49:10 +02:00
Ensure that all config keys are optional
Without this change, a config without a [display] section would fail to parse.
This commit is contained in:
parent
0879116a45
commit
410e96ef7f
1 changed files with 3 additions and 1 deletions
|
|
@ -116,7 +116,9 @@ struct RawDisplayConfig {
|
|||
|
||||
#[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)]
|
||||
struct RawConfig {
|
||||
#[serde(default)]
|
||||
style: RawStyleConfig,
|
||||
#[serde(default)]
|
||||
display: RawDisplayConfig,
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +136,7 @@ impl RawConfig {
|
|||
|
||||
raw_config
|
||||
}
|
||||
} // impl RawConfig
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct StyleConfig {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue