Skip to content

refactor: modularize lib.rs - #457

Closed
alejandro-vaz wants to merge 6 commits into
servo:v2from
alejandro-vaz:modrefactor
Closed

alejandro-vaz wants to merge 6 commits into
servo:v2from
alejandro-vaz:modrefactor

Conversation

@alejandro-vaz

@alejandro-vaz alejandro-vaz commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

this is the preliminary refactor of #427. it adds most of the minor modules, leaving the major ones to be modularized with more care

scope of this PR

this PR splits lib.rs into:

  • bytes.rs => for the bytes feature
  • errors.rs => for the error type
  • macros.rs => for the deprecated smallvec macros
  • mallocsizeof.rs => for the malloc_size_of feature
  • references.rs => Deref, borrow, asref
  • serde.rs => serialize, deserialize
  • taggedlen.rs => for the length

lib.rs still contains code that has not been modularized yet, thus this PR is part of #427 but doesn't close it yet

other changes

  • removed an is_zst::<T>() helper which was a simple equality check
  • added import-agrupation in rustfmt.toml, along with some other minor formatting constraints

@alejandro-vaz alejandro-vaz added this to the v2-alpha.13 milestone Aug 27, 2026
@alejandro-vaz alejandro-vaz self-assigned this Aug 27, 2026
@alejandro-vaz
alejandro-vaz requested a review from jdm August 27, 2026 13:21
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