Skip to content

Commit 44bfedd

Browse files
authored
chore: construct roles vector via map (#766)
1 parent 06f4db2 commit 44bfedd

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

  • rust/operator-binary/src/crd

rust/operator-binary/src/crd/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -753,11 +753,7 @@ impl AirflowRole {
753753
}
754754

755755
pub fn roles() -> Vec<String> {
756-
let mut roles = vec![];
757-
for role in Self::iter() {
758-
roles.push(role.to_string())
759-
}
760-
roles
756+
Self::iter().map(|r| r.to_string()).collect()
761757
}
762758

763759
pub fn listener_class_name(&self, airflow: &v1alpha2::AirflowCluster) -> Option<String> {

0 commit comments

Comments
 (0)