File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -80,17 +80,12 @@ public static class ProtoUtils
8080 ImmutableHashSet < P . OrchestrationStatus > replaceableStatusSet = policy . ReplaceableStatus . ToImmutableHashSet ( ) ;
8181
8282 // Calculate dedupe statuses = terminal statuses - replaceable statuses
83- List < P . OrchestrationStatus > dedupeStatuses = new ( ) ;
84- foreach ( P . OrchestrationStatus terminalStatus in terminalStatuses )
85- {
86- if ( ! replaceableStatusSet . Contains ( terminalStatus ) )
87- {
88- dedupeStatuses . Add ( terminalStatus ) ;
89- }
90- }
83+ P . OrchestrationStatus [ ] dedupeStatuses = terminalStatuses
84+ . Where ( terminalStatus => ! replaceableStatusSet . Contains ( terminalStatus ) )
85+ . ToArray ( ) ;
9186
9287 // Only return if there are dedupe statuses
93- return dedupeStatuses . Count > 0 ? dedupeStatuses . ToArray ( ) : null ;
88+ return dedupeStatuses . Length > 0 ? dedupeStatuses : null ;
9489 }
9590
9691#pragma warning disable 0618 // Referencing Obsolete member. This is intention as we are only converting it.
You can’t perform that action at this time.
0 commit comments