fix: enable partial defaults in config
This commit is contained in:
parent
66c3bab2fa
commit
ffd05c012c
1 changed files with 11 additions and 0 deletions
11
lib/main.rs
11
lib/main.rs
|
@ -44,10 +44,21 @@ impl Default for TagState {
|
|||
}
|
||||
}
|
||||
|
||||
fn default_true() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn default_3() -> u8 {
|
||||
3
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct Config {
|
||||
#[serde(default = "default_3")]
|
||||
pub prepopulate: u8,
|
||||
#[serde(default = "default_true")]
|
||||
pub strict: bool,
|
||||
#[serde(default = "default_true")]
|
||||
pub activation_on_fill: bool,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue