Skip to content

Commit 572179d

Browse files
chore: Format Rust code
1 parent ffa1b4e commit 572179d

2 files changed

Lines changed: 8 additions & 20 deletions

File tree

rust/operator-binary/src/config/jvm.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,7 @@ fn is_heap_jvm_argument(jvm_argument: &str) -> bool {
108108
#[cfg(test)]
109109
mod tests {
110110
use super::*;
111-
use crate::crd::{
112-
BrokerRole,
113-
role::KafkaRole,
114-
v1alpha1,
115-
};
111+
use crate::crd::{BrokerRole, role::KafkaRole, v1alpha1};
116112

117113
#[test]
118114
fn test_construct_jvm_arguments_defaults() {
@@ -194,13 +190,7 @@ mod tests {
194190
assert_eq!(heap_jvm_args, "-Xms34406m -Xmx40000m");
195191
}
196192

197-
fn construct_boilerplate(
198-
kafka_cluster: &str,
199-
) -> (
200-
AnyConfig,
201-
BrokerRole,
202-
String,
203-
) {
193+
fn construct_boilerplate(kafka_cluster: &str) -> (AnyConfig, BrokerRole, String) {
204194
let kafka: v1alpha1::KafkaCluster =
205195
serde_yaml::from_str(kafka_cluster).expect("illegal test input");
206196

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ pub const STACKABLE_CONFIG_DIR: &str = "/stackable/config";
6060
pub const STACKABLE_KERBEROS_DIR: &str = "/stackable/kerberos";
6161
pub const STACKABLE_KERBEROS_KRB5_PATH: &str = "/stackable/kerberos/krb5.conf";
6262

63-
pub type BrokerRole = Role<BrokerConfigFragment, KafkaConfigOverrides, GenericRoleConfig, JavaCommonConfig>;
64-
pub type ControllerRole = Role<ControllerConfigFragment, KafkaConfigOverrides, GenericRoleConfig, JavaCommonConfig>;
63+
pub type BrokerRole =
64+
Role<BrokerConfigFragment, KafkaConfigOverrides, GenericRoleConfig, JavaCommonConfig>;
65+
pub type ControllerRole =
66+
Role<ControllerConfigFragment, KafkaConfigOverrides, GenericRoleConfig, JavaCommonConfig>;
6567

6668
#[derive(Clone, Debug, Default, Deserialize, JsonSchema, PartialEq, Serialize)]
6769
#[serde(rename_all = "camelCase")]
@@ -361,17 +363,13 @@ impl v1alpha1::KafkaCluster {
361363
}
362364
}
363365

364-
pub fn broker_role(
365-
&self,
366-
) -> Result<&BrokerRole, Error> {
366+
pub fn broker_role(&self) -> Result<&BrokerRole, Error> {
367367
self.spec.brokers.as_ref().context(MissingRoleSnafu {
368368
role: KafkaRole::Broker.to_string(),
369369
})
370370
}
371371

372-
pub fn controller_role(
373-
&self,
374-
) -> Result<&ControllerRole, Error> {
372+
pub fn controller_role(&self) -> Result<&ControllerRole, Error> {
375373
self.spec.controllers.as_ref().context(MissingRoleSnafu {
376374
role: KafkaRole::Controller.to_string(),
377375
})

0 commit comments

Comments
 (0)