Skip to content

assert_eq requires PartialEq instead of Eq #7105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

ironcev
Copy link
Member

@ironcev ironcev commented Apr 23, 2025

Description

This PR changes the trait constraints on assert_eq and assert_ne from Eq to PartialEq. The Eq requirement was unnecessary strong, and is actually a "leftover" from the original implementation, before we introduced PartialEq.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@ironcev ironcev marked this pull request as ready for review April 23, 2025 13:45
@ironcev ironcev requested review from a team as code owners April 23, 2025 13:45
@ironcev ironcev self-assigned this Apr 23, 2025
@ironcev ironcev added the lib: std Standard library label Apr 23, 2025
@IGI-111 IGI-111 merged commit fe03e4e into master Apr 23, 2025
39 checks passed
@IGI-111 IGI-111 deleted the ironcev/assert-eq-requires-partial-eq branch April 23, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib: std Standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants