Skip to content

Commit a80857d

Browse files
committed
Add comment
1 parent db2f65c commit a80857d

File tree

1 file changed

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

1 file changed

+3
-0
lines changed

crates/stackable-versioned-macros/src/codegen/container/struct/k8s.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,9 @@ impl Struct {
441441
.ok_or_else(|| #convert_object_error::Parse {
442442
source: #parse_object_error::FieldNotStr{ field: "kind".to_string() }
443443
})?;
444+
// Note(@sbernauer): One could argue we don't need to check the send kind, but
445+
// IMHO this is a nice sanity check. If for *some* reason a wrong kind ends up
446+
// at a conversion, the problem might be very hard to spot without this.
444447
if object_kind != stringify!(#struct_ident) {
445448
return Err(#convert_object_error::Parse {
446449
source: #parse_object_error::WrongObjectKind{

0 commit comments

Comments
 (0)