Skip to content

Commit 0d05260

Browse files
Revise code
1 parent e550b0f commit 0d05260

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

crates/stackable-operator/src/builder/pod/volume.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ impl SecretOperatorVolumeSourceBuilder {
315315

316316
pub fn with_auto_tls_cert_domain_components_in_subject_dn(
317317
&mut self,
318-
enabled: impl Into<bool>,
318+
enabled: bool,
319319
) -> &mut Self {
320-
self.auto_tls_cert_domain_components_in_subject_dn = Some(enabled.into());
320+
self.auto_tls_cert_domain_components_in_subject_dn = Some(enabled);
321321
self
322322
}
323323

crates/stackable-operator/src/kvp/annotation/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl Annotation {
159159

160160
/// Constructs a `autoscaling.stackable.tech/retry` annotation.
161161
pub fn autoscaling_retry(retry: bool) -> Self {
162-
// SAFETY: We use expect here, because the input parameter can only be one of two possible
162+
// PANICS: We use expect here, because the input parameter can only be one of two possible
163163
// values: true or false. This fact in combination with the known annotation key length
164164
// allows us to use expect here, instead of bubbling up the error.
165165
let kvp = KeyValuePair::try_from(("autoscaling.stackable.tech/retry", retry.to_string()))
@@ -169,14 +169,14 @@ impl Annotation {
169169

170170
/// Constructs a `secrets.stackable.tech/backend.autotls.cert.domain-components-in-subject-dn` annotation.
171171
pub fn auto_tls_cert_domain_components_in_subject_dn(enabled: bool) -> Self {
172-
// SAFETY: We use expect here, because the input parameter can only be one of two possible
172+
// PANICS: We use expect here, because the input parameter can only be one of two possible
173173
// values: true or false. This fact in combination with the known annotation key length
174174
// allows us to use expect here, instead of bubbling up the error.
175175
let kvp = KeyValuePair::try_from((
176176
"secrets.stackable.tech/backend.autotls.cert.domain-components-in-subject-dn",
177177
enabled.to_string(),
178178
))
179-
.expect("annotation must be valid");
179+
.expect("annotation secrets.stackable.tech/backend.autotls.cert.domain-components-in-subject-dn must be valid");
180180
Self(kvp)
181181
}
182182
}

0 commit comments

Comments
 (0)