Skip to content

refactor: Split core traversal impls into modules#21

Merged
tisonkun merged 1 commit into
mainfrom
codex/split-core-impls
Jun 3, 2026
Merged

refactor: Split core traversal impls into modules#21
tisonkun merged 1 commit into
mainfrom
codex/split-core-impls

Conversation

@tisonkun
Copy link
Copy Markdown
Contributor

@tisonkun tisonkun commented Jun 3, 2026

Summary

  • Move built-in traversal implementations out of lib.rs into focused impls modules.
  • Keep shared trivial traversal helper macros in impls/mod.rs.
  • Leave public APIs and implementation behavior unchanged.

Tests

  • cargo x lint --fix
  • cargo x test --no-capture

@tisonkun tisonkun requested a review from Copilot June 3, 2026 12:49
@tisonkun tisonkun changed the title Split core traversal impls into modules refactor: Split core traversal impls into modules Jun 3, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the traversable crate’s internal built-in Traversable/TraversableMut implementations by moving them out of lib.rs into dedicated impls/* modules, keeping the public API surface and traversal behavior unchanged while improving maintainability.

Changes:

  • Removed the inline built-in impl modules/macros from traversable/src/lib.rs.
  • Added focused implementation modules for tuples, trivial primitives, and std types under traversable/src/impls/.
  • Centralized shared helper macros (blank_traverse_impl!, trivial_traverse_impl!) in traversable/src/impls/mod.rs and wired module inclusion via feature flags.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
traversable/src/lib.rs Removes inlined built-in impl modules/macros and keeps the crate’s core traits/public API focused.
traversable/src/impls/mod.rs Defines shared traversal helper macros and declares impl submodules (feature-gated where appropriate).
traversable/src/impls/tuple.rs Rehomes tuple Traversable/TraversableMut implementations.
traversable/src/impls/trivial.rs Rehomes primitive/unit trivial traversal implementations, preserving traverse-trivial gating.
traversable/src/impls/std_primary.rs Rehomes std “primary” type implementations (e.g., String) with traverse-std gating.
traversable/src/impls/std_container.rs Rehomes std container implementations (iterable containers, Box, Arc, locks, Cell, etc.).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tisonkun tisonkun merged commit 294935b into main Jun 3, 2026
10 checks passed
@tisonkun tisonkun deleted the codex/split-core-impls branch June 3, 2026 12:55
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.

2 participants