domain icon indicating copy to clipboard operation
domain copied to clipboard

Use an Arc to share stub resolver

Open WhyNotHugo opened this issue 1 year ago • 2 comments

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

WhyNotHugo avatar Sep 16 '24 14:09 WhyNotHugo