Skip to content

Commit 4680230

Browse files
tgauthSteveL-MSFT
authored andcommitted
default _exist to true
1 parent a299db7 commit 4680230

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

resources/sshdconfig/src/repeat_keyword.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,13 @@ pub struct NameValueEntry {
7878
pub value: Option<String>,
7979
}
8080

81+
fn default_true() -> bool { true }
82+
8183
/// Input for name-value keyword single-entry operations (e.g., subsystem).
8284
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
8385
pub struct RepeatInput {
8486
/// Whether the entry should exist (true) or be removed (false)
85-
#[serde(rename = "_exist", default)]
87+
#[serde(rename = "_exist", default = "default_true")]
8688
pub exist: bool,
8789
/// Metadata for the operation
8890
#[serde(rename = "_metadata", skip_serializing_if = "Option::is_none")]

0 commit comments

Comments
 (0)