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 associated unit trait for quantity point #235

Merged
merged 1 commit into from
May 9, 2024

Conversation

chiphogg
Copy link
Contributor

@chiphogg chiphogg commented May 8, 2024

To complement AssociatedUnitT, which is for Quantity, we add
AssociatedUnitForPointsT, to support QuantityPoint. This lets us
simplify the in/as implementations for QuantityPoint the same way we
had already done for Quantity. But the main point is to make it
easier to add unit slots to APIs that work with QuantityPoint, which
will help #221.

We also update the docs. The docs for the trait predate the tidy
concept of a "unit slot", so we change the language to be more
consistent. And on the unit slot page, we add docs for the new options
(symbols and constants) on the quantity side, and say a few more words
about quantity points.

To complement `AssociatedUnitT`, which is for `Quantity`, we add
`AssociatedUnitForPointsT`, to support `QuantityPoint`.  This lets us
simplify the in/as implementations for `QuantityPoint` the same way we
had already done for `Quantity`.  But the main point is to make it
easier to add unit slots to APIs that work with `QuantityPoint`, which
will help fix #221.

We also update the docs.  The docs for the trait predate the tidy
concept of a "unit slot", so we change the language to be more
consistent.  And on the unit slot page, we add docs for the new options
(symbols and constants) on the quantity side, and say a few more words
about quantity points.
@chiphogg chiphogg added release notes: ✨ lib (enhancement) PR enhancing the library code release notes: 📝 documentation PR affecting library documentation release notes: ♻️ lib (refactoring) Under-the-hood changes to library structure labels May 8, 2024
@chiphogg chiphogg requested a review from geoffviola May 8, 2024 22:19
Copy link
Contributor

@geoffviola geoffviola 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. The implementation and documentation look clearer.

@chiphogg chiphogg merged commit b9b89f8 into main May 9, 2024
10 checks passed
@chiphogg chiphogg deleted the chiphogg/point-unit-slots#221 branch May 9, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: 📝 documentation PR affecting library documentation release notes: ✨ lib (enhancement) PR enhancing the library code release notes: ♻️ lib (refactoring) Under-the-hood changes to library structure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants