Skip to content

Commit bcc1545

Browse files
committed
rename action to category
1 parent 148cab1 commit bcc1545

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

registry/src/config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ pub struct Registry {
3636
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, JsonSchema)]
3737
#[serde(deny_unknown_fields)]
3838
pub struct WhatIf {
39-
#[serde(rename = "changeType")]
40-
pub change_type: Action,
39+
pub category: Action,
4140
#[serde(skip_serializing_if = "Option::is_none")]
4241
pub depth: Option<usize>,
4342
#[serde(rename = "proposedValueData", skip_serializing_if = "Option::is_none")]

registry/src/registry_helper.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ impl RegistryHelper {
150150
}
151151

152152
if is_what_if {
153-
let change_type = if let Some(name_exists) = self.get()?.exist {
153+
let category = if let Some(name_exists) = self.get()?.exist {
154154
if name_exists { Action::Clobber }
155155
else { Action::New }
156156
} else { Action::Clobber };
157157
return Ok(Some(Registry {
158158
key_path: self.config.key_path.clone(),
159159
what_if: Some(WhatIf {
160-
change_type,
160+
category,
161161
proposed_data,
162162
depth,
163163
message: None
@@ -245,7 +245,7 @@ impl RegistryHelper {
245245
return Ok(Some(Registry {
246246
key_path: self.config.key_path.clone(),
247247
what_if: Some(WhatIf {
248-
change_type: Action::Error,
248+
category: Action::Error,
249249
depth: None,
250250
proposed_data: None,
251251
message: Some(error.to_string())

0 commit comments

Comments
 (0)