Skip to content
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

Add convenience conformances to ByteCount #2909

Merged

Conversation

clintonpi
Copy link
Contributor

Motivation:

Several arithmetic and comparison operations are done with ByteCount using the bytes property. Operating on the ByteCount type directly will be more convenient.

Modifications:

  • Add AdditiveArithmetic and Comparable conformances to ByteCount.

Result:

The ByteCount type can undergo arithmetic and comparison operations.

Motivation:

Several arithmetic and comparison operations are done with `ByteCount` using the `bytes` property. Operating on the `ByteCount` type directly will be more convenient.

Modifications:

- Add `AdditiveArithmetic` and `Comparable` conformances to `ByteCount`.

Result:

The `ByteCount` type can undergo arithmetic and comparison operations.
@glbrntt glbrntt added the 🆕 semver/minor Adds new public API. label Oct 9, 2024
Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

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

Looks good, just need to fix up one thing first

Co-authored-by: George Barnett <gbarnett@apple.com>
@clintonpi clintonpi requested a review from glbrntt October 9, 2024 13:50
Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

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

Looks good but the format checking CI failed

Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

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

Fab, thank you!

@glbrntt glbrntt enabled auto-merge (squash) October 9, 2024 14:08
@glbrntt glbrntt merged commit 9ff5fdd into apple:main Oct 9, 2024
28 of 29 checks passed
@clintonpi clintonpi deleted the add-convenience-conformances-to-byte-count branch October 9, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants