On a clean master (v3.9.6), a --no-default-features build fails:
$ cargo build --no-default-features
error[E0425]: cannot find type `HttpErrorStatus` in this scope
--> src/error.rs:126:17
error[E0004]: non-exhaustive patterns: `&error::Error::HttpWithBody { .. }` not covered
--> src/error.rs:205:15
Cause: in src/error.rs the HttpWithBody variant is ungated, but its field type
HttpErrorStatus and the matching classify() arm are both #[cfg(feature = "reqwest")]. Without
reqwest the variant references a type that doesn't exist (E0425) and the classify() match becomes
non-exhaustive (E0004).
Fix: gate the variant to match its field/arm — one line:
#[cfg(feature = "reqwest")] // <-- add
#[error("HTTP error {status}: {body:?}")]
#[diagnostic(code(google_maps::http_with_body))]
HttpWithBody { status: HttpErrorStatus, body: String },
Happy to send a PR. (Same fix referenced in #44 §1, but it's independent of the Workers work and can
land on its own.)
On a clean
master(v3.9.6), a--no-default-featuresbuild fails:Cause: in
src/error.rstheHttpWithBodyvariant is ungated, but its field typeHttpErrorStatusand the matchingclassify()arm are both#[cfg(feature = "reqwest")]. Withoutreqwestthe variant references a type that doesn't exist (E0425) and theclassify()match becomesnon-exhaustive (E0004).
Fix: gate the variant to match its field/arm — one line:
Happy to send a PR. (Same fix referenced in #44 §1, but it's independent of the Workers work and can
land on its own.)