Add lifetimes to async traits that take args by reference (#3061)
This PR adds lifetimes to the `IdentityResolver`, `DnsResolver` (renamed to `ResolveDns`), and `EndpointResolver` traits so that lifetime gymnastics aren't needed when implementing those traits. For example, `IdentityResolver::resolve_identity` takes `&ConfigBag` as an argument, which means you have to pull things out of the ConfigBag outside of any returned async block in order for the compiler to be satisfied. This change removes that consideration and makes implementing these traits a lot easier. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
Loading
Please register or sign in to comment