# reqwest is built with `rustls-no-provider`, so `ClientBuilder::build()` panics unless a
# rustls CryptoProvider has been installed in the process. `core::egress` installs one and
# exposes the only sanctioned constructors; calling reqwest's directly compiles fine and then
# panics at runtime in any process that has not been through `main()` -- which is every unit
# test, every integration test, and any consumer of this crate as a library.
#
# This is a lint rather than a convention because two textual sweeps during the reqwest 0.13
# migration each missed a form: `Client::new()` hiding behind an earlier `Client::builder()`
# pass, then a bare `Client::new` function reference inside `LazyLock::new`. Name resolution
# catches those, and it also catches `use reqwest::Client as C; C::new()`, which no grep can.
# `Client::default` is deliberately absent: it resolves to a `Default` trait impl, not an
# inherent function, so clippy rejects the path as unreachable and -D warnings would fail the
# build. It is also not a real escape hatch -- `Default for Client` is implemented as `new()`,
# which this list already covers at the point it matters.
= [
{ = "reqwest::Client::new", = "use openlatch_client::egress::client() -- it installs the rustls CryptoProvider first" },
{ = "reqwest::Client::builder", = "use openlatch_client::egress::client_builder()" },
{ = "reqwest::ClientBuilder::new", = "use openlatch_client::egress::client_builder()" },
{ = "reqwest::blocking::Client::new", = "use openlatch_client::egress::blocking_client()" },
{ = "reqwest::blocking::Client::builder", = "use openlatch_client::egress::blocking_client_builder()" },
{ = "reqwest::blocking::ClientBuilder::new", = "use openlatch_client::egress::blocking_client_builder()" },
{ = "reqwest::get", = "builds a client with no CryptoProvider; use openlatch_client::egress::client()" },
{ = "reqwest::blocking::get", = "builds a client with no CryptoProvider, and carries no timeout; use openlatch_client::egress::blocking_client_builder()" },
]