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

Put clone() to where it is needed #4209

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Conversation

whs-dot-hk
Copy link
Contributor

Closes: #XXX

Description

Put clone() to where it is needed


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

Copy link
Member

@romac romac left a comment

Choose a reason for hiding this comment

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

In general if a function requires unconditional ownership of a value, it should make this explicit in its signature and take an owned type. That said, in this case it doesn't hurt too much to do it third way so I'll leave it up to @ljoss17 to decide which version he prefers.

@ljoss17
Copy link
Contributor

ljoss17 commented Oct 14, 2024

Let's go with this solution as it looks a bit cleaner

@whs-dot-hk
Copy link
Contributor Author

Applied cargo fmt

Copy link
Contributor

@ljoss17 ljoss17 left a comment

Choose a reason for hiding this comment

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

Thank you for the work!

@romac romac disabled auto-merge October 15, 2024 08:23
@romac romac merged commit a737bf0 into informalsystems:master Oct 15, 2024
26 checks passed
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.

3 participants