Extract shared logic from run() and run_watch() #13

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

Severity: Medium

crates/presentation/src/lib.rs lines 64-92 (run()) and lines 346-373 (the run_once closure inside run_watch()) are nearly identical: load config, build graph, create renderer, parse rules, execute GenerateDiagram, write output, report violations.

This is copy-paste code. Extract a shared function.

**Severity: Medium** `crates/presentation/src/lib.rs` lines 64-92 (`run()`) and lines 346-373 (the `run_once` closure inside `run_watch()`) are nearly identical: load config, build graph, create renderer, parse rules, execute `GenerateDiagram`, write output, report violations. This is copy-paste code. Extract a shared function.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/archlens#13