georust/kml

Error when not using zip feature

vilaureu opened this issue · 2 comments

Problem

The kml crate does not compile without the zip feature.

error[E0433]: failed to resolve: use of undeclared crate or module `zip`
  --> kml/src/errors.rs:34:22
   |
34 |     ZipError(#[from] zip::result::ZipError),
   |                      ^^^ use of undeclared crate or module `zip`

Steps to Reproduce

Create a new crate with cargo and add kml = { version = "0.4.1", default-features = false } to the dependencies.
cargo check now fails.

Possible Solution

Adding the line #[cfg(feature = "zip")] before #[error("ZIP error: {0}")] in errors.rs fixes the issue for me.

@vilaureu thanks for reporting this! Do you want to put in a PR with that change? Otherwise I can patch that quick. It probably makes sense to update CI to test different feature combinations as well

Thanks again @vilaureu! This is included in the v0.4.2 release