Skip to content

Commit 64d6437

Browse files
committed
clippy lints
1 parent d4dc4fd commit 64d6437

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ impl ReconcilerError for Error {
7373
}
7474
}
7575

76+
#[allow(clippy::type_complexity)]
7677
pub fn create_context(
7778
client: Client,
7879
) -> (
@@ -350,7 +351,7 @@ async fn reconcile(
350351
"spec": {
351352
"template": {
352353
"metadata": {
353-
"annotations": get_updated_restarter_annotations(&sts, ctx).await?,
354+
"annotations": get_updated_restarter_annotations(sts, ctx).await?,
354355
},
355356
},
356357
},

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ pub enum Error {
2121
CreateWebhookServer { source: WebhookError },
2222
}
2323

24-
pub async fn create_webhook_server<'a>(
24+
pub async fn create_webhook_server(
2525
ctx: Arc<Ctx>,
26-
operator_environment: &'a OperatorEnvironmentOptions,
26+
operator_environment: &OperatorEnvironmentOptions,
2727
disable_restarter_mutating_webhook: bool,
2828
client: Client,
2929
) -> Result<WebhookServer, Error> {

rust/operator-binary/src/webhook/restarter_mutate_sts.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pub async fn add_sts_restarter_annotation(
100100
})
101101
});
102102

103-
let annotations = match get_updated_restarter_annotations(&sts, ctx).await {
103+
let annotations = match get_updated_restarter_annotations(sts, ctx).await {
104104
Ok(annotations) => annotations,
105105
Err(err) => {
106106
return AdmissionResponse::invalid(format!(
@@ -129,9 +129,9 @@ pub async fn add_sts_restarter_annotation(
129129
{
130130
Ok(response) => response,
131131
Err(err) => {
132-
return AdmissionResponse::invalid(format!(
132+
AdmissionResponse::invalid(format!(
133133
"failed to add patch to AdmissionResponse: {err:#}"
134-
));
134+
))
135135
}
136136
}
137137
}

0 commit comments

Comments
 (0)