Skip to content

fix: improve docs, optimize allocations, and refactor budget-report m… - #756

Merged
wagmiiii merged 1 commit into
Tollcraft:mainfrom
Mutech939:fix/issues-695-697-698-699
Oct 2, 2026
Merged

wagmiiii merged 1 commit into
Tollcraft:mainfrom
Mutech939:fix/issues-695-697-698-699

Conversation

@Mutech939

Copy link
Copy Markdown

…odules

Closes #695
Closes #697
Closes #698
Closes #699

  • Improve inline documentation and comments in cargo-budget-report/src/deploy_cache.rs #697 cargo-budget-report/src/deploy_cache.rs: Add doc comments to private types CacheEntry and CacheFile explaining each field's role. Document DeployCache fields (path, file, dirty). Add doc comment to hex_sha256 explaining zero-padding behaviour. Add inline comments in load (read->parse->version-check chain), put (evict-then-insert pattern), and save (dirty-guard rationale).

  • Review and optimize performance/allocations in cargo-budget-report/src/limit_checks.rs #699 cargo-budget-report/src/limit_checks.rs: Add module-level doc comment. Remove #![allow(dead_code)] — the three public functions are part of the crate's public API and do not need it. Add doc comments on check_bounds (generic bound rationale), and on each public function explaining the u32->u64 widening and why it is lossless.

  • Review and optimize performance/allocations in cargo-budget-report/src/replay.rs #695 cargo-budget-report/src/replay.rs: Add doc comment on the entries field. Add constructor doc explaining the zero-copy move from FixtureFile. Add inline comments in each Transport impl method explaining the JSON extractor choice (as_str vs cloned) and what a missing key means for test-setup.

  • Refactor and modularize complex logic in cargo-budget-report/src/config.rs #698 cargo-budget-report/src/config.rs: Add module-level doc comment. Add field-level doc comments on all four Config fields. Add doc comments on parse_config and PartialConfig. Extract apply_partial() helper to separate merge logic from I/O concerns, making both functions individually testable. Remove #![allow(dead_code)]. Add apply_partial_only_overrides_present_fields unit test covering the new helper directly.

@drips-wave

drips-wave Bot commented Sep 26, 2026

Copy link
Copy Markdown

@Mutech939 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mergekeeper

mergekeeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

MergeKeeper review unavailable

AI provider failed: gemini-3.5-flash-lite (200)

No approval or merge action was taken.

…odules

Closes Tollcraft#695
Closes Tollcraft#697
Closes Tollcraft#698
Closes Tollcraft#699

- Tollcraft#697 cargo-budget-report/src/deploy_cache.rs:
  Add doc comments to private types CacheEntry and CacheFile explaining
  each field's role. Document DeployCache fields (path, file, dirty).
  Add doc comment to hex_sha256 explaining zero-padding behaviour.
  Add inline comments in load (read->parse->version-check chain),
  put (evict-then-insert pattern), and save (dirty-guard rationale).

- Tollcraft#699 cargo-budget-report/src/limit_checks.rs:
  Add module-level doc comment. Remove #![allow(dead_code)] — the three
  public functions are part of the crate's public API and do not need it.
  Add doc comments on check_bounds (generic bound rationale), and on each
  public function explaining the u32->u64 widening and why it is lossless.

- Tollcraft#695 cargo-budget-report/src/replay.rs:
  Add doc comment on the entries field. Add constructor doc explaining
  the zero-copy move from FixtureFile. Add inline comments in each
  Transport impl method explaining the JSON extractor choice (as_str vs
  cloned) and what a missing key means for test-setup.

- Tollcraft#698 cargo-budget-report/src/config.rs:
  Add module-level doc comment. Add field-level doc comments on all four
  Config fields. Add doc comments on parse_config and PartialConfig.
  Extract apply_partial() helper to separate merge logic from I/O
  concerns, making both functions individually testable. Remove
  #![allow(dead_code)]. Add apply_partial_only_overrides_present_fields
  unit test covering the new helper directly.
@Mutech939
Mutech939 force-pushed the fix/issues-695-697-698-699 branch from 1281253 to 8a7ea5b Compare September 30, 2026 17:14
@Mutech939

Copy link
Copy Markdown
Author

@mallison031 please merge my pr

@wagmiiii
wagmiiii merged commit 80526df into Tollcraft:main Oct 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants