Skip to content

Conversation

@cameroncros
Copy link
Contributor

@cameroncros cameroncros commented Nov 7, 2025

Seamlessly works with Result return types.

Only memoizes the success path, as Errors can't be cloned.

If there is more work required to get this mergable, please let me know, happy to make any required changes.

@cameroncros cameroncros force-pushed the feature/memoize_result branch from 4945ac2 to 5f430a0 Compare November 7, 2025 16:57
@cameroncros cameroncros mentioned this pull request Nov 7, 2025
@@ -1,16 +1,29 @@
use memoize::memoize;

#[memoize]
Copy link
Owner

Choose a reason for hiding this comment

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

nice example, but given that this one is the trivial one, maybe keep it trivial? And instead set up a new example, e.g. result.rs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, i figured that results was also a trivial case, but thats fair enough.

@cameroncros
Copy link
Contributor Author

@dermesser Do you need anything more from me on this?

@dermesser dermesser merged commit 1e7cc77 into dermesser:master Jan 5, 2026
2 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