Skip to content
Unverified Commit d293d1f7 authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

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._
parent 8439f2ae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment