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

Minor improvement cache avoid clone #479

Merged

Conversation

crodas
Copy link
Contributor

@crodas crodas commented Nov 28, 2024

Description

Avoid cloning to serialize to JSON; instead, dereference the object, as Serde needs a reference to the object.

This minor improvement was found when researching the caching layer (to propose a fix for #478)

Checklist

Avoid cloning to serialize to JSON; instead, dereference the object, as Serde
needs a reference to the object.

This minor improvement was found when researching the caching layer.
This one was introduced by me :D
@thesimplekid thesimplekid changed the title Minor improvement cache avoid cache Minor improvement cache avoid clone Nov 30, 2024
Copy link
Collaborator

@thesimplekid thesimplekid 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. In general I think clone is over used in the codebase so these PRs are appreciated.

@thesimplekid thesimplekid merged commit 7d15587 into cashubtc:main Nov 30, 2024
42 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.

2 participants