Skip to content

Commit e08b1ba

Browse files
committed
docs: Document why we need to provide an empty struct
1 parent 25c05b9 commit e08b1ba

File tree

1 file changed

+6
-0
lines changed
  • rust/operator-binary/src/crd

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,17 @@ pub mod versioned {
230230
pub struct TrinoConfig {
231231
// config.properties
232232
pub query_max_memory: Option<String>,
233+
233234
pub query_max_memory_per_node: Option<String>,
235+
234236
#[fragment_attrs(serde(default))]
235237
pub logging: Logging<Container>,
238+
239+
// We need to provide *something* that implements `Fragment`, so we pick an empty struct here.
240+
// Note that a unit "()" would not work, as we need something that implements `Fragment`.
236241
#[fragment_attrs(serde(default))]
237242
pub resources: Resources<TrinoStorageConfig, NoRuntimeLimits>,
243+
238244
#[fragment_attrs(serde(default))]
239245
pub affinity: StackableAffinity,
240246

0 commit comments

Comments
 (0)