Skip to content

Add convenience conformances to ByteCount#2909

Merged
glbrntt merged 3 commits into
apple:mainfrom
clintonpi:add-convenience-conformances-to-byte-count
Oct 9, 2024
Merged

Add convenience conformances to ByteCount#2909
glbrntt merged 3 commits into
apple:mainfrom
clintonpi:add-convenience-conformances-to-byte-count

Conversation

@clintonpi
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread Sources/NIOFileSystem/ByteCount.swift Outdated
@clintonpi clintonpi requested a review from glbrntt October 9, 2024 13:50
Copy link
Copy Markdown
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
Copy Markdown
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
@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