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

Counter example doesn't compile #434

Closed
sphinxc0re opened this issue May 3, 2024 · 1 comment
Closed

Counter example doesn't compile #434

sphinxc0re opened this issue May 3, 2024 · 1 comment

Comments

@sphinxc0re
Copy link

sphinxc0re commented May 3, 2024

I'm was trying to use the library but couldn't get past the compilation of tiny_skia. I'm getting the following error with Rust 1.75 as well as 1.78:

error[E0308]: mismatched types
   --> tiny_skia/src/lib.rs:422:58
    |
422 |                 let pixmap = self.cache_glyph(cache_key, glyph_run.color);
    |                                   -----------            ^^^^^^^^^^^^^^^ expected `floem_peniko::Color`, found `peniko::color::Color`
    |                                   |
    |                                   arguments to this method are incorrect
    |
    = note: `peniko::color::Color` and `floem_peniko::Color` have similar names, but are actually distinct types
note: `peniko::color::Color` is defined in crate `peniko`
   --> [REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/peniko-0.1.0/src/color.rs:12:1
    |
12  | pub struct Color {
    | ^^^^^^^^^^^^^^^^
note: `floem_peniko::Color` is defined in crate `floem_peniko`
   --> [REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/floem-peniko-0.1.0/src/color.rs:9:1
    |
9   | pub struct Color {
    | ^^^^^^^^^^^^^^^^
note: method defined here
   --> tiny_skia/src/lib.rs:297:8
    |
297 |     fn cache_glyph(&mut self, cache_key: CacheKey, color: Color) -> Option<Rc<Glyph>> {
    |     

Then I tried just running the example and that didn't work, so here I am 😅

EDIT: Getting the same error in the released version as well as main. Don't know how that works, you shouldn't be able to release something to crates.io that doesn't compile.

@panekj
Copy link
Collaborator

panekj commented May 3, 2024

It will be fixed by #432
Use cargo update --package floem-cosmic-text --precise 0.7.1 to fix it

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

3 participants