Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when not using zip feature #21

Closed
vilaureu opened this issue Mar 14, 2022 · 2 comments · Fixed by #22
Closed

Error when not using zip feature #21

vilaureu opened this issue Mar 14, 2022 · 2 comments · Fixed by #22

Comments

@vilaureu
Copy link
Contributor

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.

@pjsier
Copy link
Member

pjsier commented Mar 14, 2022

@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

@pjsier
Copy link
Member

pjsier commented Mar 15, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants