chore: code cleanup - narrow visibility, extract constant, fix httpmock 0.8 API, fix workspace-hack - #103
Merged
Merged
Conversation
…ck 0.8 API, fix workspace-hack
- Extract TOKEN_CACHE_POISONED constant from duplicate string literals in transport.rs
- Narrow plan_entity_{create,update,delete,revive} from pub to pub(crate)
- Migrate httpmock 0.8 API: body_contains -> body_includes, hits() -> calls()
- Fix workspace-hack duplicate windows-sys entries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code Cleanup (Cycle #4)
Automated code cleanup pass for the fpt-cli project.
Changes
1. Extract
TOKEN_CACHE_POISONEDconstant (transport.rs)"token cache is poisoned"string literal into a named constantread_token_cacheandwrite_token_cacheoperations2. Narrow
plan_entity_*visibility (transport.rs)plan_entity_create,plan_entity_update,plan_entity_delete,plan_entity_revivefrompubtopub(crate)fpt-domaincrate and are not re-exported inlib.rs3. Fix httpmock 0.8 API migration (
rest_transport_tests.rs)body_contains()→body_includes()(3 occurrences).hits()→.calls()(110 occurrences)4. Fix workspace-hack duplicate dependency (
workspace-hack/Cargo.toml)windows-sysv0.61 entries with different feature sets into a single unified entrycargo check/cargo clippybuild failureVerification
cargo fmt --all— formattedcargo clippy --workspace— zero warningscargo test --workspace— all tests pass (97 passed, 2 doc-tests ignored)