Replace manual enum-to-string conversions with strum derives #5

Open
opened 2026-07-25 11:17:25 +00:00 by GKaszewski · 0 comments
Owner

Severity: Medium

Files like crates/adapters/postgres/src/catalog/mod.rs have dozens of *_from_str / *_to_str functions (asset_type_from_str, asset_type_to_str, source_from_str, source_to_str, detection_from_str, etc.).

These should use strum::EnumString / strum::Display derives or at minimum a macro. This is mechanical boilerplate that will grow with every new enum variant.

**Severity: Medium** Files like `crates/adapters/postgres/src/catalog/mod.rs` have dozens of `*_from_str` / `*_to_str` functions (`asset_type_from_str`, `asset_type_to_str`, `source_from_str`, `source_to_str`, `detection_from_str`, etc.). These should use `strum::EnumString` / `strum::Display` derives or at minimum a macro. This is mechanical boilerplate that will grow with every new enum variant.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/k-photos#5