Skip to content

Commit 3b87bfd

Browse files
author
Andrew
committed
Perf optimization in adapter lookup table 2
1 parent 8bd80b9 commit 3b87bfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dsc_lib/src/discovery/command_discovery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ fn add_resources_to_lookup_table(adapted_resources: &BTreeMap<String, Vec<DscRes
541541
if let Some(adapter_name) = &res_vec[0].require_adapter {
542542
let new_value = adapter_name.to_string();
543543
let oldvalue = lookup_table.insert(resource_name.to_string().to_lowercase(), new_value.clone());
544-
if !lookup_table_changed && (oldvalue == None || oldvalue.is_some_and(|val| val != new_value)) {
544+
if !lookup_table_changed && (oldvalue.is_none() || oldvalue.is_some_and(|val| val != new_value)) {
545545
lookup_table_changed = true;
546546
};
547547
} else {

0 commit comments

Comments
 (0)