-
Notifications
You must be signed in to change notification settings - Fork 25
Enumeration are not idomatic #13
Copy link
Copy link
Open
Description
It is recommended to prefix enum variant with the enum name in ptotobuf for better support in some languages as such:
enum RuleLevel {
RULE_LEVEL_UNKNOWN = 0;
RULE_LEVEL_INFORMATIONAL = 1;
RULE_LEVEL_LOW = 3;
RULE_LEVEL_MEDIUM = 4;
RULE_LEVEL_HIGH = 5;
RULE_LEVEL_CRITICAL = 6;
}But in Rust it would be more idomatic to remove the prefix and CamelCase the variant as such:
enum RuleLevel {
Unknown,
Informational,
Low,
Medium,
High,
Critical,
}This is what prost does for example.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.