How to pass closure for mocking async call?

⚓ rust    📅 2025-05-14    👤 surdeus    👁️ 3      

surdeus

So that I can unit test an async call that's expensive, how can I pass the function so that my unit tests can mock it?

Here's what I have nearly working, except the argument reference causes lifetime issues I am beyond confused with:

Permalink to the playground

2 posts - 2 participants

Read full topic

🏷️ rust_feed