Skip to content

refactor(utils): consolidate size constants and remove unused code#94

Merged
flexiondotorg merged 1 commit intomainfrom
cleanup
Jan 22, 2026
Merged

refactor(utils): consolidate size constants and remove unused code#94
flexiondotorg merged 1 commit intomainfrom
cleanup

Conversation

@flexiondotorg
Copy link
Copy Markdown
Member

@flexiondotorg flexiondotorg commented Jan 22, 2026

  • Move KB, MB, GB constants to module level for reuse
  • Refactor format_size and format_transfer_rate to use shared constants
  • Remove unused HTTP_TIMEOUT constant
  • Remove unused HashMismatch error variant
  • Remove futures dependency and related unused code
  • Clean up comments in main.rs and downloader.rs

Summary by cubic

Consolidated byte size constants in utils and refactored formatting helpers to use them. Removed unused code and the futures dependency to simplify the codebase and reduce build size; no functional changes.

  • Refactors

    • Moved KB/MB/GB constants to module scope in utils; used by format_size and format_transfer_rate.
    • Removed unused HTTP_TIMEOUT constant and HashMismatch error variant.
    • Cleaned up comments in main.rs and downloader.rs.
  • Dependencies

    • Dropped futures crate and related code; updated Cargo.toml and Cargo.lock.

Written for commit d5a2ce6. Summary will update on new commits.

- Move KB, MB, GB constants to module level for reuse
- Refactor format_size and format_transfer_rate to use shared constants
- Remove unused HTTP_TIMEOUT constant
- Remove unused HashMismatch error variant
- Remove futures dependency and related unused code
- Clean up comments in main.rs and downloader.rs

Signed-off-by: Martin Wimpress <martin@wimpress.org>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

@flexiondotorg flexiondotorg merged commit 641540b into main Jan 22, 2026
6 checks passed
@flexiondotorg flexiondotorg deleted the cleanup branch January 22, 2026 10:26
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.

1 participant