Skip to content

fix(deps): update rust crate winit to 0.30 #6304

fix(deps): update rust crate winit to 0.30

fix(deps): update rust crate winit to 0.30 #6304

GitHub Actions / clippy failed Jul 17, 2024 in 1s

clippy

3 errors, 27 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 3
Warning 27
Note 0
Help 0

Versions

  • rustc 1.79.0 (129f3b996 2024-06-10)
  • cargo 1.79.0 (ffa9cf99a 2024-06-03)
  • clippy 0.1.79 (129f3b9 2024-06-10)

Annotations

Check warning on line 18 in crates/runtime/wgpu/src/window/processor.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of deprecated method `winit::platform::pump_events::EventLoopExtPumpEvents::pump_events`: use EventLoopExtPumpEvents::pump_app_events

warning: use of deprecated method `winit::platform::pump_events::EventLoopExtPumpEvents::pump_events`: use EventLoopExtPumpEvents::pump_app_events
  --> crates/runtime/wgpu/src/window/processor.rs:18:14
   |
18 |             .pump_events(Some(Duration::ZERO), |event, _target| {
   |              ^^^^^^^^^^^

Check failure on line 90 in crates/runtime/wgpu/src/window/event_loop.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

no method named `available_monitors` found for struct `winit::event_loop::EventLoop` in the current scope

error[E0599]: no method named `available_monitors` found for struct `winit::event_loop::EventLoop` in the current scope
  --> crates/runtime/wgpu/src/window/event_loop.rs:90:14
   |
89 | /         self.event_loop
90 | |             .available_monitors()
   | |             -^^^^^^^^^^^^^^^^^^ method not found in `EventLoop<()>`
   | |_____________|
   | 

Check warning on line 26 in crates/runtime/wgpu/src/window/event_loop.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of deprecated associated function `winit::event_loop::EventLoopBuilder::<()>::new`: use `EventLoop::builder` instead

warning: use of deprecated associated function `winit::event_loop::EventLoopBuilder::<()>::new`: use `EventLoop::builder` instead
  --> crates/runtime/wgpu/src/window/event_loop.rs:26:45
   |
26 |         let mut builder = EventLoopBuilder::new();
   |                                             ^^^
   |
   = note: `#[warn(deprecated)]` on by default

Check failure on line 79 in crates/runtime/wgpu/src/window/event_loop.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

failed to resolve: could not find `WindowBuilder` in `window`

error[E0433]: failed to resolve: could not find `WindowBuilder` in `window`
  --> crates/runtime/wgpu/src/window/event_loop.rs:79:37
   |
79 |         let window = winit::window::WindowBuilder::new()
   |                                     ^^^^^^^^^^^^^ could not find `WindowBuilder` in `window`

Check failure on line 43 in crates/runtime/wgpu/src/window/event_loop.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

failed to resolve: could not find `WindowBuilder` in `window`

error[E0433]: failed to resolve: could not find `WindowBuilder` in `window`
  --> crates/runtime/wgpu/src/window/event_loop.rs:43:37
   |
43 |         let window = winit::window::WindowBuilder::new()
   |                                     ^^^^^^^^^^^^^ could not find `WindowBuilder` in `window`

Check warning on line 26 in crates/components/timecode/src/commands/rename_timecode_control.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
  --> crates/components/timecode/src/commands/rename_timecode_control.rs:26:13
   |
26 |             control.name = self.name.clone();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `control.name.clone_from(&self.name)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

Check warning on line 17 in crates/components/ui/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you should consider adding a `Default` implementation for `UiApi`

warning: you should consider adding a `Default` implementation for `UiApi`
  --> crates/components/ui/src/lib.rs:13:5
   |
13 | /     pub fn new() -> Self {
14 | |         Self {
15 | |             bus: MessageBus::new(),
16 | |         }
17 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
12 + impl Default for UiApi {
13 +     fn default() -> Self {
14 +         Self::new()
15 +     }
16 + }
   |

Check warning on line 26 in crates/components/timecode/src/commands/rename_timecode.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
  --> crates/components/timecode/src/commands/rename_timecode.rs:26:13
   |
26 |             timecode.name = self.name.clone();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `timecode.name.clone_from(&self.name)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
   = note: `#[warn(clippy::assigning_clones)]` on by default

Check warning on line 33 in crates/components/connections/protocols/midi/src/connections.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
  --> crates/components/connections/protocols/midi/src/connections.rs:33:13
   |
33 |             device.profile = profile.clone();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `device.profile.clone_from(&profile)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
   = note: `#[warn(clippy::assigning_clones)]` on by default

Check warning on line 82 in crates/components/media/src/thumbnail_generator/video_generator.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> crates/components/media/src/thumbnail_generator/video_generator.rs:82:20
   |
82 |         image.save(&target)?;
   |                    ^^^^^^^ help: change this to: `target`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
   = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default

Check warning on line 72 in crates/components/media/src/media_handlers/audio_handler.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `&Box<T>`. Consider using just `&T`

warning: you seem to be trying to use `&Box<T>`. Consider using just `&T`
  --> crates/components/media/src/media_handlers/audio_handler.rs:72:34
   |
72 |     fn get_channel_count(format: &Box<dyn FormatReader>) -> Option<u32> {
   |                                  ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn FormatReader`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box

Check warning on line 66 in crates/components/media/src/media_handlers/audio_handler.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `&Box<T>`. Consider using just `&T`

warning: you seem to be trying to use `&Box<T>`. Consider using just `&T`
  --> crates/components/media/src/media_handlers/audio_handler.rs:66:32
   |
66 |     fn get_sample_rate(format: &Box<dyn FormatReader>) -> Option<u32> {
   |                                ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn FormatReader`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box

Check warning on line 57 in crates/components/media/src/media_handlers/audio_handler.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `&Box<T>`. Consider using just `&T`

warning: you seem to be trying to use `&Box<T>`. Consider using just `&T`
  --> crates/components/media/src/media_handlers/audio_handler.rs:57:29
   |
57 |     fn get_duration(format: &Box<dyn FormatReader>) -> Option<u64> {
   |                             ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn FormatReader`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box
   = note: `#[warn(clippy::borrowed_box)]` on by default

Check warning on line 64 in crates/components/media/src/documents/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you should consider adding a `Default` implementation for `TagId`

warning: you should consider adding a `Default` implementation for `TagId`
  --> crates/components/media/src/documents/mod.rs:62:5
   |
62 | /     pub fn new() -> Self {
63 | |         TagId(uuid::Uuid::new_v4())
64 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
   |
61 + impl Default for TagId {
62 +     fn default() -> Self {
63 +         Self::new()
64 +     }
65 + }
   |

Check warning on line 25 in crates/components/media/src/documents/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you should consider adding a `Default` implementation for `MediaId`

warning: you should consider adding a `Default` implementation for `MediaId`
  --> crates/components/media/src/documents/mod.rs:23:5
   |
23 | /     pub fn new() -> Self {
24 | |         MediaId(uuid::Uuid::new_v4())
25 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
22 + impl Default for MediaId {
23 +     fn default() -> Self {
24 +         Self::new()
25 +     }
26 + }
   |

Check warning on line 62 in crates/components/connections/protocols/midi/device-profiles/src/profile.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

implementation of inherent method `to_string(&self) -> String` for type `profile::ProfileErrors`

warning: implementation of inherent method `to_string(&self) -> String` for type `profile::ProfileErrors`
  --> crates/components/connections/protocols/midi/device-profiles/src/profile.rs:51:5
   |
51 | /     pub fn to_string(&self) -> String {
52 | |         match self {
53 | |             ProfileErrors::PagesLoadingError(err) => format!("Pages loading error: {}", err),
54 | |             ProfileErrors::OutputScriptLoadingError(err) => {
...  |
61 | |         }
62 | |     }
   | |_____^
   |
   = help: implement trait `Display` for type `profile::ProfileErrors` instead
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string
   = note: `#[warn(clippy::inherent_to_string)]` on by default

Check warning on line 48 in crates/components/connections/protocols/midi/device-profiles/src/profile.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

all variants have the same postfix: `Error`

warning: all variants have the same postfix: `Error`
  --> crates/components/connections/protocols/midi/device-profiles/src/profile.rs:43:1
   |
43 | / pub enum ProfileErrors {
44 | |     PagesLoadingError(String),
45 | |     OutputScriptLoadingError(String),
46 | |     OutputScriptWritingError(String),
47 | |     LayoutLoadingError(String),
48 | | }
   | |_^
   |
   = help: remove the postfixes and use full paths to the variants instead of glob imports
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
   = note: `#[warn(clippy::enum_variant_names)]` on by default

Check warning on line 10 in crates/components/media/src/background_media_job.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `status_handle` is never read

warning: field `status_handle` is never read
  --> crates/components/media/src/background_media_job.rs:10:5
   |
8  | pub struct BackgroundMediaJob {
   |            ------------------ field in this struct
9  |     media_server: MediaServer,
10 |     status_handle: StatusHandle,
   |     ^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 60 in crates/components/connections/devices/webcams/src/discovery.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you should consider adding a `Default` implementation for `WebcamDiscovery`

warning: you should consider adding a `Default` implementation for `WebcamDiscovery`
  --> crates/components/connections/devices/webcams/src/discovery.rs:46:5
   |
46 | /     pub fn new() -> Self {
47 | |         let (sender, receiver) = unbounded();
48 | |
49 | |         if !nokhwa_check() {
...  |
59 | |         Self { cameras: receiver }
60 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
45 + impl Default for WebcamDiscovery {
46 +     fn default() -> Self {
47 +         Self::new()
48 +     }
49 + }
   |

Check warning on line 91 in crates/components/connections/protocols/pro-dj-link/src/discovery.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if let` can be collapsed into the outer `if let`

warning: this `if let` can be collapsed into the outer `if let`
  --> crates/components/connections/protocols/pro-dj-link/src/discovery.rs:85:29
   |
85 | / ...                   if let ProDJLinkDevice::CDJ(cdj) = device {
86 | | ...                       cdj.speed = packet.speed;
87 | | ...                       cdj.beat = packet.beat;
88 | | ...                       if let Err(err) = sender.send(ProDJLinkDevice::CDJ(cdj.clone())) {
89 | | ...                           tracing::error!("Failed to send CDJ device: {err:?}");
90 | | ...                       }
91 | | ...                   }
   | |_______________________^
   |
help: the outer pattern can be modified to include the inner pattern
  --> crates/components/connections/protocols/pro-dj-link/src/discovery.rs:84:37
   |
84 |                         if let Some(device) = devices.get_mut(&packet.device_id) {
   |                                     ^^^^^^ replace this binding
85 |                             if let ProDJLinkDevice::CDJ(cdj) = device {
   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
   = note: `#[warn(clippy::collapsible_match)]` on by default

Check warning on line 29 in crates/components/connections/protocols/dmx/src/commands/add_artnet_input.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `Ipv4Addr` which implements the `Copy` trait

warning: using `clone` on type `Ipv4Addr` which implements the `Copy` trait
  --> crates/components/connections/protocols/dmx/src/commands/add_artnet_input.rs:29:38
   |
29 |         let input = ArtnetInput::new(self.host.clone(), self.port, self.name.clone())?;
   |                                      ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.host`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check warning on line 29 in crates/components/connections/protocols/dmx/src/buffer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `[u8; 512]` which implements the `Copy` trait

warning: using `clone` on type `[u8; 512]` which implements the `Copy` trait
  --> crates/components/connections/protocols/dmx/src/buffer.rs:29:56
   |
29 |         self.buffers.iter().map(|entry| (*entry.key(), entry.value().clone()))
   |                                                        ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*entry.value()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
   = note: `#[warn(clippy::clone_on_copy)]` on by default

Check warning on line 80 in crates/components/connections/protocols/dmx/src/inputs/artnet.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `thread` is never read

warning: field `thread` is never read
  --> crates/components/connections/protocols/dmx/src/inputs/artnet.rs:80:5
   |
79 | struct ThreadHandle {
   |        ------------ field in this struct
80 |     thread: JoinHandle<()>,
   |     ^^^^^^
   |
   = note: `ThreadHandle` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

Check warning on line 8 in crates/util/src/conversion.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

clamp-like pattern without using clamp function

warning: clamp-like pattern without using clamp function
 --> crates/util/src/conversion.rs:8:9
  |
8 |         (self * u8::MAX as f64).min(255.).max(0.).floor() as u8
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(self * u8::MAX as f64).clamp(0., 255.)`
  |
  = note: clamp will panic if max < min, min.is_nan(), or max.is_nan()
  = note: clamp returns NaN if the input is NaN
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp
  = note: `#[warn(clippy::manual_clamp)]` on by default

Check warning on line 11 in crates/runtime/commander/src/extractors/sub_command.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
  --> crates/runtime/commander/src/extractors/sub_command.rs:11:39
   |
11 |     pub fn apply(self, command: T) -> anyhow::Result<(T::Result, (T, T::State))> {
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
   = note: `#[warn(clippy::type_complexity)]` on by default