Skip to content

Conversation

@chipshort
Copy link
Contributor

closes #1609

@chipshort chipshort requested a review from webmaster128 May 2, 2023 11:59
@chipshort chipshort changed the base branch from main to 1.2 May 2, 2023 12:08
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

Nice. Just unsure about the trait case.

Can you add a CHANGELOG entry to the Unreleased section as part of the PR?

/// Returns the multiplicative inverse `q/p` for fraction `p/q`.
///
/// If `p` is zero, None is returned.
#[must_use = "this returns the result of the operation, without modifying the original"]
Copy link
Member

Choose a reason for hiding this comment

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

Is this the right place here? Does this belong to the trait definition or the trait implementation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think it has to go in the trait definition. When I put it on the impl, it does not trigger the warning.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for double checking

@chipshort chipshort force-pushed the chipshort/issue1609 branch from cbe4b97 to fbba7f6 Compare May 2, 2023 13:29
@chipshort chipshort merged commit 1915d0e into 1.2 May 2, 2023
@chipshort chipshort deleted the chipshort/issue1609 branch May 2, 2023 13:40
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.

#[must_use] is missing on many methods

3 participants