Skip to content

Commit 11f8ec0

Browse files
SteveL-MSFTSteve Lee (POWERSHELL HE/HIM) (from Dev Box)
authored andcommitted
add missing text and fix clippy
1 parent eb108b1 commit 11f8ec0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dsc_lib/locales/en-us.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ resourceInvalidJson = "Resource reported input JSON is not valid"
146146
invalidArrayKey = "Unsupported array value for key '%{key}'. Only string and number is supported."
147147
invalidKey = "Unsupported value for key '%{key}'. Only string, bool, number, and array is supported."
148148
inDesiredStateNotBool = "'_inDesiredState' is not a boolean"
149+
exportNotSupportedUsingGet = "Export is not supported by resource '%{resource}' using get operation"
149150

150151
[dscresources.dscresource]
151152
invokeGet = "Invoking get for '%{resource}'"

tools/dsctest/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ fn main() {
139139
];
140140
// depending on the input, return the appropriate instance whether it is name or id or both
141141
let resource = if let Some(name) = get.name {
142-
instances.into_iter().find(|i| i.name == Some(name.clone())).unwrap_or_else(|| {
143-
eprintln!("No instance found with name: {}", name);
142+
instances.into_iter().find(|i| i.name.as_ref() == Some(&name)).unwrap_or_else(|| {
143+
eprintln!("No instance found with name: {name}");
144144
std::process::exit(1);
145145
})
146146
} else if let Some(id) = get.id {
147147
instances.into_iter().find(|i| i.id == Some(id)).unwrap_or_else(|| {
148-
eprintln!("No instance found with id: {}", id);
148+
eprintln!("No instance found with id: {id}");
149149
std::process::exit(1);
150150
})
151151
} else {

0 commit comments

Comments
 (0)