We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32e461c commit 2ad77ffCopy full SHA for 2ad77ff
rust/operator-binary/src/hdfs_clusterrolebinding_nodes_controller.rs
@@ -72,19 +72,11 @@ pub async fn reconcile(
72
}
73
74
})
75
- .flat_map(|(meta, sa_name)| {
76
- let mut result = vec![Subject {
77
- kind: "ServiceAccount".to_string(),
78
- name: sa_name,
79
- namespace: meta.namespace.clone(),
80
- ..Subject::default()
81
- }];
82
- // If a cluster is called hdfs this would result in the same subject
83
- // being written twicex.
84
- // Since we know this vec only contains two elements we can use dedup for
85
- // simply removing this duplicate.
86
- result.dedup();
87
- result
+ .map(|(meta, sa_name)| Subject {
+ kind: "ServiceAccount".to_string(),
+ name: sa_name,
+ namespace: meta.namespace.clone(),
+ ..Subject::default()
88
89
.collect();
90
0 commit comments