Skip to content

Simplify codebase: extract shared helpers and reduce duplication#13

Merged
RomarQ merged 13 commits intomainfrom
rq/fix-default-features-improvements
Mar 18, 2026
Merged

Simplify codebase: extract shared helpers and reduce duplication#13
RomarQ merged 13 commits intomainfrom
rq/fix-default-features-improvements

Conversation

@RomarQ
Copy link
Copy Markdown
Owner

@RomarQ RomarQ commented Mar 18, 2026

Extract shared helpers (read_manifest, item_as_table_like, for_each_dep_table) and remove duplicated code across modules.

RomarQ added 13 commits March 18, 2026 15:46
- Strip `default-features` from member deps when converting to
  `{ workspace = true }` since it must be set at the workspace level
- Scan target-specific dep sections when checking for default-features
- Add target_deps fixture and tests for target-specific dependencies
- Remove unused DepSection enum, Display impl, and section field from MemberDep
- Remove unused path field from MemberCrate
- Move DEP_SECTIONS to workspace.rs as pub(crate), import in fix.rs
- Rename read_toml to read_file in tests (it reads strings, not parsed TOML)
workspace.rs was using the toml crate for read-only parsing while
fix.rs used toml_edit for format-preserving edits. Since toml is just
a wrapper around toml_edit, consolidate on toml_edit as the single
TOML library.
- Add read_manifest, item_as_table_like, for_each_dep_table helpers
- Merge two member loops in check.rs into one
- Deduplicate fixture() test helper
- Remove TOCTOU exists() check in expand_members
@RomarQ RomarQ merged commit 38426c1 into main Mar 18, 2026
2 checks passed
@RomarQ RomarQ deleted the rq/fix-default-features-improvements branch March 18, 2026 22:27
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