Skip to content

Commit f898d01

Browse files
committed
fix clippy
1 parent 029cf3f commit f898d01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dsc_lib/src/configure/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ pub fn add_resource_export_results_to_configuration(resource: &DscResource, conf
6969
let mut r = config_doc::Resource::new();
7070
let mut props: Map<String, Value> = serde_json::from_value(instance.clone())?;
7171
if let Some(kind) = props.remove("_kind") {
72-
r.kind = kind.as_str().map(|s| s.to_string());
72+
r.kind = kind.as_str().map(std::string::ToString::to_string);
7373
}
7474
if let Some(security_context) = props.remove("_securityContext") {
75-
r.security_context = security_context.as_str().map(|s| s.to_string());
75+
r.security_context = security_context.as_str().map(std::string::ToString::to_string);
7676
}
7777
r.name = if let Some(name) = props.remove("_name") {
7878
name.as_str()
79-
.map(|s| s.to_string())
79+
.map(std::string::ToString::to_string)
8080
.ok_or_else(|| DscError::Parser(t!("configure.mod.valueCouldNotBeTransformedAsString", value = name).to_string()))?
8181
} else {
8282
format!("{}-{}", r.resource_type, i)

0 commit comments

Comments
 (0)