Skip to content

refactor(cli): extract shared progress-bar helpers into progress module#3

Merged
StudentWeis merged 2 commits into
mainfrom
refactor/2-extract-progress-bar-helpers
Apr 25, 2026
Merged

refactor(cli): extract shared progress-bar helpers into progress module#3
StudentWeis merged 2 commits into
mainfrom
refactor/2-extract-progress-bar-helpers

Conversation

@StudentWeis
Copy link
Copy Markdown
Owner

Summary

Extract duplicated progress-bar creation and teardown logic from find.rs, mv.rs, and rename.rs into a new commands/progress.rs module.

Linked Issue

Closes #2

Changes

  • Added src/commands/progress.rs with create_spinner() and finish() helpers
  • Replaced inline ProgressBar::new_spinner() + set_style() + finish_and_clear() in find.rs, mv.rs, rename.rs with calls to the shared helpers
  • Registered the new module in src/commands/mod.rs
  • Net reduction: -14 lines (37 added, 51 removed)

Testing

  • scripts/precheck.sh passes locally (268 tests pass, 0 clippy issues)
  • No new tests needed — this is a pure internal refactor with no behavior change

Extract duplicated ProgressBar creation (new_spinner + set_style) and
teardown (finish_and_clear) logic from find.rs, mv.rs, and rename.rs
into a new commands/progress.rs module with create_spinner() and
finish() helpers.

Refs #2
@StudentWeis StudentWeis merged commit cee482c into main Apr 25, 2026
8 checks passed
@StudentWeis StudentWeis deleted the refactor/2-extract-progress-bar-helpers branch April 25, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(cli): extract shared progress-bar helpers to reduce command duplication

1 participant