Specifically, asserting that result is a specific variant of an enum of structs when we don't care about the fields (something like "is instance of"):
assert!(matches!(return_with_fields(), MyEnum::WithFields { .. }));
Specifically, asserting that result is a specific variant of an enum of structs when we don't care about the fields (something like "is instance of"):
assert!(matches!(return_with_fields(), MyEnum::WithFields { .. }));