-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
Both of YoleckEntityRef's fields are Option:
Lines 57 to 63 in 40ccb74
| #[derive(Clone, PartialEq, Eq, Hash, Serialize, Deserialize, Default, Debug)] | |
| pub struct YoleckEntityRef { | |
| #[serde(default, skip_serializing_if = "Option::is_none")] | |
| uuid: Option<Uuid>, | |
| #[serde(skip)] | |
| resolved: Option<Entity>, | |
| } |
resolved has to be optional, because otherwise we won't be able to deserialize it. But theoretically the uuid should not be optional and instead the YoleckEntityRef can be put inside an Option - because when the uuid is None the resolved is meaningless.
Then again - even though it'd be more correct that way, usability-wise the YoleckEntityRef will have to always be inside an Option - so maybe it's not such a great idea after all?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested