Skip to content

Commit b918f00

Browse files
authored
Apply suggestions from code review
1 parent 962e818 commit b918f00

File tree

1 file changed

+7
-0
lines changed
  • crates/stackable-versioned-macros/src/codegen/container

1 file changed

+7
-0
lines changed

crates/stackable-versioned-macros/src/codegen/container/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,20 +381,27 @@ impl ToTokens for KubernetesCrateOptions {
381381
}
382382
}
383383

384+
/// Wraps a value to indicate whether it is original or has been overridden.
384385
#[derive(Debug)]
385386
pub(crate) struct Override<T> {
386387
is_overridden: bool,
387388
inner: T,
388389
}
389390

390391
impl<T> Override<T> {
392+
/// Mark a value as a default.
393+
///
394+
/// This is used to indicate that the value is a default and was not overridden.
391395
pub(crate) fn new_default(inner: T) -> Self {
392396
Override {
393397
is_overridden: false,
394398
inner,
395399
}
396400
}
397401

402+
/// Mark a value as overridden.
403+
///
404+
/// This is used to indicate that the value was overridden and not the default.
398405
pub(crate) fn new_custom(inner: T) -> Self {
399406
Override {
400407
is_overridden: true,

0 commit comments

Comments
 (0)