Skip to content

Implement downloader and error handling for patch retrieval - #14

Draft
Iamliuxiaozhen wants to merge 1 commit into
mainfrom
r/trait
Draft

Iamliuxiaozhen wants to merge 1 commit into
mainfrom
r/trait

Conversation

@Iamliuxiaozhen

Copy link
Copy Markdown
Member
  • Introduced Downloader trait and CurlDownloader struct in download.rs for fetching patches using curl.
  • Added AppError enum in error.rs to handle various application errors, including download failures and invalid arguments.
  • Created Host trait and platform-specific implementations for GitHub and GitLab in host.rs, encapsulating platform behavior.
  • Refactored main.rs to utilize the new downloader and error handling, improving code organization and readability.
  • Removed redundant code related to command-line argument parsing and patch downloading, centralizing functionality in dedicated modules.

- Introduced `Downloader` trait and `CurlDownloader` struct in `download.rs` for fetching patches using curl.
- Added `AppError` enum in `error.rs` to handle various application errors, including download failures and invalid arguments.
- Created `Host` trait and platform-specific implementations for GitHub and GitLab in `host.rs`, encapsulating platform behavior.
- Refactored `main.rs` to utilize the new downloader and error handling, improving code organization and readability.
- Removed redundant code related to command-line argument parsing and patch downloading, centralizing functionality in dedicated modules.
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