domain
domain copied to clipboard
Use an Arc to share stub resolver
This somewhat simplifies usage for call sites. They no longer need to use &&StubResolver for some APIs, and a future can be handed off without being tied to the lifetime of the resolver.
The documentation already mentioned that the StubResolver was behind an Arc so I did not need to updated it. StubResolver now implements clone, which is cheap since it merely clones the Arc with the inner data.
This change is backwards-incompatible, and necessitates a bump in minor for the next unstable release.
Fixes: https://github.com/NLnetLabs/domain/issues/175