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

Fix some warnings in examples #663

Merged
merged 1 commit into from
Aug 11, 2024
Merged

Conversation

tannal
Copy link
Contributor

@tannal tannal commented Aug 11, 2024

Fixs the following warnings.

   Compiling scenes v0.0.0 (C:\Users\tannal\tannalwork\projects\vello\examples\scenes)
warning: the item `Color` is imported redundantly
   --> examples\scenes\src\simple_text.rs:163:29
    |
8   | use vello::peniko::{Blob, Brush, BrushRef, Color, Font, StyleRef};
    |                                            ----- the item `Color` is already imported here
...
163 |         use vello::peniko::{Color, Fill};
    |                             ^^^^^
    |
    = note: `#[warn(unused_imports)]` on by default

warning: the item `PI` is imported redundantly
   --> examples\scenes\src\test_scenes.rs:611:13
    |
86  |     use std::f64::consts::PI;
    |         -------------------- the item `PI` is already imported here
...
611 |         use std::f64::consts::PI;
    |             ^^^^^^^^^^^^^^^^^^^^

   Compiling vello_tests v0.0.0 (C:\Users\tannal\tannalwork\projects\vello\vello_tests)
warning: `scenes` (lib) generated 2 warnings (2 duplicates)
   Compiling with_winit v0.0.0 (C:\Users\tannal\tannalwork\projects\vello\examples\with_winit) 
   Compiling headless v0.0.0 (C:\Users\tannal\tannalwork\projects\vello\examples\headless)     
warning: `scenes` (lib test) generated 2 warnings

Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any idea why this wasn't caught by CI before?

I'd like this change to also include the ci fix for that as well, if it's something obvious we missed.

Thanks for sending in the fix!

@tannal
Copy link
Contributor Author

tannal commented Aug 11, 2024

It's caused by the Rust toolchain version:

  • Rust 1.77 reports this error
  • The latest Rust 1.80 does not have this issue

https://github.com/tannal/vello/actions/runs/10339098122/job/28618032657#step:4:223

The imported redundantly lint was disabled recently.
rust-lang/rust#121708 (comment)

CI is fine, it's not on us. XD

@DJMcNab
Copy link
Member

DJMcNab commented Aug 11, 2024

Thanks for that detailed report. To clarify, these lints are correctly capped when using Vello as a dependency, right? Edit: These aren't even in the dependencies of the vello crate.

@DJMcNab DJMcNab added this pull request to the merge queue Aug 11, 2024
Merged via the queue into linebender:main with commit 02cfbd9 Aug 11, 2024
17 checks passed
@waywardmonkeys waywardmonkeys added this to the Vello 0.3 release milestone Aug 12, 2024
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

Successfully merging this pull request may close these issues.

3 participants