Skip to content

More idiomatic return types for metadata getters#2398

Merged
cmichi merged 2 commits intouse-ink:masterfrom
davidsemakula:metadata-copy-return-types
Feb 11, 2025
Merged

More idiomatic return types for metadata getters#2398
cmichi merged 2 commits intouse-ink:masterfrom
davidsemakula:metadata-copy-return-types

Conversation

@davidsemakula
Copy link
Collaborator

@davidsemakula davidsemakula commented Feb 10, 2025

Summary

Closes - N/A

  • [y] y/n | Does it introduce breaking changes?
  • [n] y/n | Is it dependent on a specific version of cargo-contract or pallet-revive?

More idiomatic return types for some metadata getters that return references to types that are cheap to copy.

Description

Changes a few metadata getter assoc fns that return &T when T: Copy to return T instead

Checklist before requesting a review

  • I have added an entry to CHANGELOG.md
  • I have commented on my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules
@cmichi cmichi merged commit 39157b3 into use-ink:master Feb 11, 2025
@davidsemakula davidsemakula deleted the metadata-copy-return-types branch February 11, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants