We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db2f65c commit a80857dCopy full SHA for a80857d
crates/stackable-versioned-macros/src/codegen/container/struct/k8s.rs
@@ -441,6 +441,9 @@ impl Struct {
441
.ok_or_else(|| #convert_object_error::Parse {
442
source: #parse_object_error::FieldNotStr{ field: "kind".to_string() }
443
})?;
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.
447
if object_kind != stringify!(#struct_ident) {
448
return Err(#convert_object_error::Parse {
449
source: #parse_object_error::WrongObjectKind{
0 commit comments