Skip to content

Commit 526d62b

Browse files
committed
fix clippy
1 parent d86df6d commit 526d62b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dsc_lib/src/discovery/command_discovery.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,14 @@ impl ResourceDiscovery for CommandDiscovery {
190190

191191
let mut adapted_resources = BTreeMap::<String, Vec<DscResource>>::new();
192192

193-
for (adapter_name, adapters) in self.adapters.iter() {
193+
for (adapter_name, adapters) in &self.adapters {
194194
for adapter in adapters {
195195
info!("Enumerating resources for adapter '{}'", adapter_name);
196196
let pb_adapter_span = warn_span!("");
197197
pb_adapter_span.pb_set_style(&ProgressStyle::with_template(
198198
"{spinner:.green} [{elapsed_precise:.cyan}] {msg:.white}"
199199
)?);
200-
pb_adapter_span.pb_set_message(format!("Enumerating resources for adapter '{}'", adapter_name).as_str());
200+
pb_adapter_span.pb_set_message(format!("Enumerating resources for adapter '{adapter_name}'").as_str());
201201
let _ = pb_adapter_span.enter();
202202
let manifest = if let Some(manifest) = &adapter.manifest {
203203
if let Ok(manifest) = import_manifest(manifest.clone()) {
@@ -282,7 +282,7 @@ impl ResourceDiscovery for CommandDiscovery {
282282
let mut found_resources = BTreeMap::<String, DscResource>::new();
283283
let mut remaining_required_resource_types = required_resource_types.to_owned();
284284

285-
for (resource_name, resources) in self.resources.iter() {
285+
for (resource_name, resources) in &self.resources {
286286
let Some(resource ) = resources.first() else {
287287
// skip if no resources
288288
continue;
@@ -302,7 +302,7 @@ impl ResourceDiscovery for CommandDiscovery {
302302
debug!("Found {} matching non-adapter-based resources", found_resources.len());
303303

304304
// now go through the adapter resources and add them to the list of resources
305-
for (adapted_name, adapted_resource) in self.adapted_resources.iter() {
305+
for (adapted_name, adapted_resource) in &self.adapted_resources {
306306
let Some(adapted_resource) = adapted_resource.first() else {
307307
// skip if no resources
308308
continue;

0 commit comments

Comments
 (0)