dyz1990 / sevenz-rust

A 7z decompressor/compressor lib written in pure rust
Apache License 2.0
146 stars 24 forks source link

Unable to build without default features #22

Closed IohannRabeson closed 1 year ago

IohannRabeson commented 1 year ago

Hi! Since 0.4.0 sevenz-rust fails to build if you do not enable the default feature "compress". If default-features = false is used, sevenz-rust build fails with this error:

error[E0432]: unresolved import `lzma_rust::LZMA2Options`
 --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\sevenz-rust-0.4.0\src\method_options.rs:1:5
  |
1 | use lzma_rust::LZMA2Options;
  |     ^^^^^^^^^^^^^^^^^^^^^^^ no `LZMA2Options` in the root

error[E0599]: no variant or associated item named `LZMA2` found for enum `MethodOptions` in the current scope
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\sevenz-rust-0.4.0\src\method_options.rs:32:68
   |
9  | pub enum MethodOptions {
   | ---------------------- variant or associated item `LZMA2` not found for this enum
...
32 |         Self::new(SevenZMethod::LZMA2).with_options(MethodOptions::LZMA2(value))
   |                                                                    ^^^^^ variant or associated item not found in `MethodOptions`
dyz1990 commented 1 year ago

@IohannRabeson Thank you for your report. This issue was fixed on version 0.4.1.