Replace manual enum-to-string conversions with strum derives #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Medium
Files like
crates/adapters/postgres/src/catalog/mod.rshave dozens of*_from_str/*_to_strfunctions (asset_type_from_str,asset_type_to_str,source_from_str,source_to_str,detection_from_str, etc.).These should use
strum::EnumString/strum::Displayderives or at minimum a macro. This is mechanical boilerplate that will grow with every new enum variant.