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

MSRV is broken in 0.12? #142

Open
RazrFalcon opened this issue Nov 20, 2022 · 1 comment
Open

MSRV is broken in 0.12? #142

RazrFalcon opened this issue Nov 20, 2022 · 1 comment

Comments

@RazrFalcon
Copy link

I'm targeting 1.51.0 and getting:

error[E0277]: `[u8; 3]` is not an iterator
   --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/gif-0.12.0/src/common.rs:241:41
    |
241 |         let palette = colors_vec.iter().flat_map(|&(r, g, b, _a)| [r, g, b]).collect();
    |                                         ^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
    |
    = help: the trait `Iterator` is not implemented for `[u8; 3]`
    = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
    = note: required because of the requirements on the impl of `IntoIterator` for `[u8; 3]`

error[E05[99](https://github.com/RazrFalcon/resvg/actions/runs/3509130848/jobs/5878016472#step:4:100)]: the method `collect` exists for struct `FlatMap<std::slice::Iter<'_, (u8, u8, u8, u8)>, [u8; 3], [closure@/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/gif-0.12.0/src/common.rs:241:50: 241:76]>`, but its trait bounds were not satisfied
   --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/gif-0.12.0/src/common.rs:241:78
    |
241 |           let palette = colors_vec.iter().flat_map(|&(r, g, b, _a)| [r, g, b]).collect();
    |                                                                                ^^^^^^^ method cannot be called on `FlatMap<std::slice::Iter<'_, (u8, u8, u8, u8)>, [u8; 3], [closure@/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/gif-0.12.0/src/common.rs:241:50: 241:76]>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `[u8; 3]: IntoIterator`
            which is required by `FlatMap<std::slice::Iter<'_, (u8, u8, u8, u8)>, [u8; 3], [closure@/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/gif-0.12.0/src/common.rs:241:50: 241:76]>: Iterator`
            `FlatMap<std::slice::Iter<'_, (u8, u8, u8, u8)>, [u8; 3], [closure@/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/gif-0.12.0/src/common.rs:241:50: 241:76]>: Iterator`
            which is required by `&mut FlatMap<std::slice::Iter<'_, (u8, u8, u8, u8)>, [u8; 3], [closure@/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/gif-0.12.0/src/common.rs:241:50: 241:76]>: Iterator`

According to this repo CI is seems like you're targeting 1.34.2, but the check doesn't work or something.

It seems like you're using 1.53.0 feature.

@HeroicKatora
Copy link
Member

I would have assumed us to be targetting 1.61 already, but CI should be investigated regardless. It's truly puzzling. The toolchain job reports setting 1.34.2 as the default and then it doesn't end up getting used? That's strange.

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

No branches or pull requests

2 participants