Skip to content

Commit b1e4d03

Browse files
committed
fix: rustfmt lint
1 parent 5ec8b76 commit b1e4d03

File tree

3 files changed

+21
-26
lines changed

3 files changed

+21
-26
lines changed

rust/operator-binary/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
mod restart_controller;
22

33
use built_info::PKG_VERSION;
4-
use clap::{crate_description, crate_version, Parser};
4+
use clap::{Parser, crate_description, crate_version};
55
use futures::pin_mut;
66
use stackable_operator::{
7+
CustomResourceExt,
78
cli::{Command, ProductOperatorRun},
89
commons::{
910
authentication::AuthenticationClass,
1011
s3::{S3Bucket, S3Connection},
1112
},
12-
CustomResourceExt,
1313
};
1414

1515
mod built_info {

rust/operator-binary/src/restart_controller/pod.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ use stackable_operator::{
1313
api::{EvictParams, PartialObjectMeta},
1414
core::DynamicObject,
1515
runtime::{
16+
Controller,
1617
controller::Action,
1718
events::{Recorder, Reporter},
1819
reflector::ObjectRef,
19-
watcher, Controller,
20+
watcher,
2021
},
2122
},
22-
logging::controller::{report_controller_reconciled, ReconcilerError},
23+
logging::controller::{ReconcilerError, report_controller_reconciled},
2324
namespace::WatchNamespace,
2425
};
2526
use strum::{EnumDiscriminants, IntoStaticStr};
@@ -73,13 +74,10 @@ pub async fn start(client: &Client, watch_namespace: &WatchNamespace) {
7374
watch_namespace.get_api::<PartialObjectMeta<Pod>>(client),
7475
watcher::Config::default(),
7576
);
76-
let event_recorder = Arc::new(Recorder::new(
77-
client.as_kube_client(),
78-
Reporter {
79-
controller: FULL_CONTROLLER_NAME.to_string(),
80-
instance: None,
81-
},
82-
));
77+
let event_recorder = Arc::new(Recorder::new(client.as_kube_client(), Reporter {
78+
controller: FULL_CONTROLLER_NAME.to_string(),
79+
instance: None,
80+
}));
8381
controller
8482
.run(
8583
reconcile,

rust/operator-binary/src/restart_controller/statefulset.rs

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use std::{
22
collections::BTreeMap,
3-
sync::{atomic::AtomicBool, Arc},
3+
sync::{Arc, atomic::AtomicBool},
44
time::Duration,
55
};
66

7-
use futures::{stream, Stream, StreamExt, TryStream};
7+
use futures::{Stream, StreamExt, TryStream, stream};
88
use serde_json::json;
99
use snafu::{ResultExt, Snafu};
1010
use stackable_operator::{
@@ -15,19 +15,19 @@ use stackable_operator::{
1515
},
1616
kube,
1717
kube::{
18+
Resource, ResourceExt,
1819
api::{PartialObjectMeta, Patch, PatchParams},
19-
core::{error_boundary, DeserializeGuard, DynamicObject},
20+
core::{DeserializeGuard, DynamicObject, error_boundary},
2021
runtime::{
21-
applier,
22-
controller::{trigger_self, trigger_with, Action, ReconcileRequest},
22+
Config, WatchStreamExt, applier,
23+
controller::{Action, ReconcileRequest, trigger_self, trigger_with},
2324
events::{Recorder, Reporter},
2425
metadata_watcher, reflector,
2526
reflector::{ObjectRef, Store},
26-
watcher, Config, WatchStreamExt,
27+
watcher,
2728
},
28-
Resource, ResourceExt,
2929
},
30-
logging::controller::{report_controller_reconciled, ReconcilerError},
30+
logging::controller::{ReconcilerError, report_controller_reconciled},
3131
namespace::WatchNamespace,
3232
};
3333
use strum::{EnumDiscriminants, IntoStaticStr};
@@ -87,13 +87,10 @@ pub async fn start(client: &Client, watch_namespace: &WatchNamespace) {
8787
let secret_store = reflector::store::Writer::<PartialObjectMeta<Secret>>::new(());
8888
let cms_inited = Arc::new(AtomicBool::from(false));
8989
let secrets_inited = Arc::new(AtomicBool::from(false));
90-
let event_recorder = Arc::new(Recorder::new(
91-
client.as_kube_client(),
92-
Reporter {
93-
controller: FULL_CONTROLLER_NAME.to_string(),
94-
instance: None,
95-
},
96-
));
90+
let event_recorder = Arc::new(Recorder::new(client.as_kube_client(), Reporter {
91+
controller: FULL_CONTROLLER_NAME.to_string(),
92+
instance: None,
93+
}));
9794

9895
applier(
9996
|sts, ctx| Box::pin(reconcile(sts, ctx)),

0 commit comments

Comments
 (0)