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

uplink: add impl PartialEq<[u8; 32]> for ContractId #376

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Conversation

ureeves
Copy link
Member

@ureeves ureeves commented Jul 29, 2024

According to the cross crate considerations of the Rust documentation, one should only implement PartialEq for local types, and not for foreign types.

As for implementing it on references... PartialEq already takes both operands by reference, making these implementations useless in practice.

Resolves: #375

According to the cross crate considerations* of the Rust documentation,
one should only implement `PartialEq` for local types, and not for
foreign types.

As for implementing it on references... `PartialEq` already takes both
operands by reference, making these implementations useless in practice.

* https://doc.rust-lang.org/std/cmp/trait.PartialEq.html#cross-crate-considerations

Resolves: #375
Copy link
Member

@HDauven HDauven left a comment

Choose a reason for hiding this comment

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

LGTM

@ureeves ureeves merged commit d464f36 into main Jul 29, 2024
6 checks passed
@ureeves ureeves deleted the contract-id-cmp branch July 29, 2024 22:31
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.

Add impl PartialEq<[u8; 32]> for ContractId
2 participants