Skip to content

Remove unnecessary constraints from QFlags derived implementations #1265

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jnbooth
Copy link
Contributor

@jnbooth jnbooth commented May 7, 2025

A QFlags is just a wrapper around an integer, so it should always implement Eq, Ord, etc. However, derived implementations apply their constraints to all type arguments, which means that currently, QFlags<T> only implements Ord if T implements Ord, and so on. There's no reason to have those bounds, so I removed them.

Copy link

codecov bot commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (20dd5ad) to head (2e29d32).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1265   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           73        73           
  Lines        12681     12681           
=========================================
  Hits         12681     12681           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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