carzum / termviz

ROS visualisation on the terminal
MIT License
385 stars 22 forks source link

Pin image pkg version #92

Closed AlexKaravaev closed 6 months ago

AlexKaravaev commented 7 months ago

Latest version(tried with 0.25.1) breaks compability, I get

root@2c7e3d1e50fa:/home/termviz# cargo build --release
    Updating crates.io index
   Compiling termviz v0.1.1 (/home/termviz)
error[E0308]: mismatched types
   --> src/app_modes/image_view.rs:134:50
    |
134 |                     let widget = Image::with_img(image.clone()).color_mode(ColorMode::Rgb);
    |                                  --------------- ^^^^^^^^^^^^^ expected `ImageBuffer<Rgba<u8>, Vec<u8>>`, found a different `ImageBuffer<Rgba<u8>, Vec<u8>>`
    |                                  |
    |                                  arguments to this function are incorrect
    |
    = note: `ImageBuffer<Rgba<u8>, Vec<u8>>` and `ImageBuffer<Rgba<u8>, Vec<u8>>` have similar names, but are actually distinct types
note: `ImageBuffer<Rgba<u8>, Vec<u8>>` is defined in crate `image`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/image-0.25.1/src/buffer.rs:656:1
    |
656 | pub struct ImageBuffer<P: Pixel, Container> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `ImageBuffer<Rgba<u8>, Vec<u8>>` is defined in crate `image`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/image-0.24.9/src/buffer.rs:656:1
    |
656 | pub struct ImageBuffer<P: Pixel, Container> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `image` are being used?
note: associated function defined here
   --> /root/.cargo/git/checkouts/tui-image-37e59775b15e45e9/7aa600c/src/lib.rs:37:9
    |
37  |     pub fn with_img(img: RgbaImage) -> Image<'a> {
    |            ^^^^^^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `termviz` (bin "termviz") due to 1 previous error
ValerioMagnago commented 6 months ago

This is also fixed in here by @MichaelGrupp

AlexKaravaev commented 6 months ago

Ah yes actually true! @MichaelGrupp i am closing this then