Skip to content

Refactor PartialEq implementations - #588

Merged
alejandro-vaz merged 2 commits into
servo:v2from
TDecking:traits
Sep 6, 2026
Merged

Refactor PartialEq implementations#588
alejandro-vaz merged 2 commits into
servo:v2from
TDecking:traits

Conversation

@TDecking

@TDecking TDecking commented Sep 6, 2026

Copy link
Copy Markdown
Contributor
  • Introduces the same macro alloc uses for implementing PartialEq for its linear data structures, removing a bit of boilerplate.
  • Some implementations of PartialEq that Vec has but SmallVec has not are implemented,
    making it easer to use SmallVec as a drop-in replacement for Vec.
  • Adds PartialEq implementations for Vec, such that comparisons like smallvec == vec work
    without having to call as_slice or indexing.

@alejandro-vaz alejandro-vaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I really disagree with standard library macro bloat instead of writing things, but this is rust so I better stfu

@alejandro-vaz
alejandro-vaz added this pull request to the merge queue Sep 6, 2026
Merged via the queue into servo:v2 with commit 3a264e4 Sep 6, 2026
6 checks passed
@TDecking
TDecking deleted the traits branch September 6, 2026 14:11
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