guibranco / viacep-rs

🇧🇷 :round_pushpin: ViaCEP client wrapper for Rust projects
https://guibranco.github.io/viacep-rs/
MIT License
5 stars 1 forks source link

Fix [FEATURE] Rewrite client with updated dependencies with gitauto model #24

Closed gitauto-ai[bot] closed 2 months ago

gitauto-ai[bot] commented 3 months ago

Original issue: #5

What is the feature

The feature involves rewriting the client with updated dependencies to ensure better performance, security, and maintainability. This includes using modern Rust HTTP client libraries and following best practices for API client development.

Why we need the feature

  1. Performance: Updated dependencies often come with performance improvements.
  2. Security: Newer versions of libraries fix known vulnerabilities.
  3. Maintainability: Using up-to-date libraries ensures that the codebase remains maintainable and easier to work with for future developers.
  4. Best Practices: Adopting modern libraries and techniques ensures that the project adheres to current best practices in Rust development.

How to implement and why

  1. Update Cargo.toml:

    • Add or update dependencies for modern Rust HTTP client libraries such as reqwest.
    • Ensure that all dependencies are compatible with each other.
  2. Refactor src/bin/search_address.rs and src/bin/search_zipcode.rs:

    • Replace old HTTP client code with the new reqwest client.
    • Ensure that all API calls are updated to use the new client.
    • Handle errors and responses according to the new library's best practices.
  3. Update src/lib.rs:

    • Refactor any shared client logic to use the updated dependencies.
    • Ensure that the library's public API remains consistent and backward-compatible if possible.
  4. Testing:

    • Write new tests or update existing ones to cover the changes.
    • Ensure that all tests pass and that the new client behaves as expected.
  5. Documentation:

    • Update the README.md and any other relevant documentation to reflect the changes.
    • Provide examples of how to use the new client.

By following these steps, we ensure that the client is modernized, secure, and maintainable, aligning with the latest best practices in Rust development.

Test these changes locally

git checkout -b gitauto/issue-#5-254683b7-56b0-42f7-84a9-fba57c6a2f07
git pull origin gitauto/issue-#5-254683b7-56b0-42f7-84a9-fba57c6a2f07
AppVeyorBot commented 3 months ago

:x: Build viacep-rs 1.0.110 failed (commit https://github.com/guibranco/viacep-rs/commit/7114ae6f25 by @gitauto-ai[bot])

guibranco commented 2 months ago

@gstraccini review

gstraccini[bot] commented 2 months ago

Reviewing this pull request.

Commits included: SHA: 23d78a95eb339a1e837668cdcf0ad6b0433103a0 SHA: 6231337d358d3839a4bf66da1b6ee88fb2363906 SHA: 8b8f802e14cc87c2a1f09b1b4082ded9d92b625f ! :eyes:

guibranco commented 2 months ago

@gstraccini review

gstraccini[bot] commented 2 months ago

Reviewing this pull request.

Commits included: SHA: 23d78a95eb339a1e837668cdcf0ad6b0433103a0 SHA: 6231337d358d3839a4bf66da1b6ee88fb2363906 SHA: 8b8f802e14cc87c2a1f09b1b4082ded9d92b625f ! :eyes: