jay3332 / ril

Rust Imaging Library: A high-level imaging crate for Rust.
https://crates.io/crates/ril
MIT License
81 stars 10 forks source link

Compile fails when using custom features #12

Closed PlainBane closed 1 year ago

PlainBane commented 1 year ago
Compiling ril v0.9.0
error[E0277]: `?` couldn't convert the error to `error::Error`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/ril-0.9.0/src/encodings/jpeg.rs:94:10
   |
94 |         )?;
   |          ^ the trait `From<jpeg_encoder::EncodingError>` is not implemented for `error::Error`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = help: the following other types implement trait `From<T>`:
             <error::Error as From<DecodingError>>
             <error::Error as From<jpeg_decoder::Error>>
             <error::Error as From<png::EncodingError>>
             <error::Error as From<std::io::Error>>
   = note: required for `std::result::Result<(), error::Error>` to implement `FromResidual<std::result::Result<Infallible, jpeg_encoder::EncodingError>>`

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
**Cargo.toml** 

ril = { version = "0.9", default-features = false, features = [
    "png",
    "jpeg",
    "webp",
    "gif", <--------------- If this is removed, compile fails
] }
jay3332 commented 1 year ago

Fixed in https://github.com/jay3332/ril/commit/8af2ddc14d74d69e6c43d8d348881b6cd99ec531, thanks for reporting!