Closed not-my-profile closed 2 years ago
but why ? It's look totally wrong, why are you using Capture<dyn Activated>
?
I want to abstract over Capture<Active>
and Capture<Offline>
(the code snippet from the commit message is just a minimal example to illustrate the error). I want to create a capture either by tapping an interface or by reading a file and then later read from the capture in a new tokio task.
Ah yeah of course ... thanks!
I updated this PR to just add an example about this to the docs.
LGTM
@not-my-profile can you please rebase on top of the latest master
so that the tests can rerun? Since you're adding a code example I believe your example will be run during tests. I assume the most suitable fix would be to just add ignore
like for the previous example, but I'll leave that up to you.
Thanks @not-my-profile
(the PR has been changed)