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

feat: Bring back AnswerFn with support for parameter borrows #47

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

audunhalland
Copy link
Owner

@audunhalland audunhalland commented Mar 22, 2024

I tried as a test to dog-food the applies API introduced in #43, but found I didn't like it very much. This change brings back the answers API, but without any type magic around its return type, so the respond API has been completely removed. The type returned through AnswerFn is just the same raw type that the trait method returns, and the signature is almost the same. Borrows can be made by using new method Unimock::make_ref.

@audunhalland audunhalland force-pushed the new-answer-fn branch 3 times, most recently from 78dca61 to 9d53646 Compare March 23, 2024 01:24
@audunhalland audunhalland changed the title feat: A new experiment with AnswerFn that hopefully supports paramete… feat: Bring back AnswerFn with support for parameter borrows Mar 23, 2024
@audunhalland audunhalland merged commit 13b4e0f into next Mar 23, 2024
4 checks passed
@audunhalland audunhalland deleted the new-answer-fn branch March 23, 2024 01:50
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.

1 participant