fix(deps): update rust crate usvg to 0.42 #6253
test.yml
on: push
test-linux
4m 32s
test-android
0s
Annotations
3 errors and 32 warnings
mismatched types:
crates/components/vector/src/svg_parser.rs#L13
error[E0308]: mismatched types
--> crates/components/vector/src/svg_parser.rs:13:45
|
13 | vello_svg::render_tree_with(&mut scene, &svg_tree, &usvg::Transform::default(), &mut vello_svg::default_error_handler)?;
| --------------------------- ^^^^^^^^^ expected `vello_svg::usvg::Tree`, found `usvg::Tree`
| |
| arguments to this function are incorrect
|
= note: `usvg::Tree` and `vello_svg::usvg::Tree` have similar names, but are actually distinct types
note: `usvg::Tree` is defined in crate `usvg`
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/usvg-0.42.0/src/tree/mod.rs:1539:1
|
1539 | pub struct Tree {
| ^^^^^^^^^^^^^^^
note: `vello_svg::usvg::Tree` is defined in crate `usvg`
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/usvg-0.40.0/src/tree/mod.rs:1506:1
|
1506 | pub struct Tree {
| ^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `usvg` are being used?
note: function defined here
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/vello_svg-0.1.0/src/lib.rs:71:8
|
71 | pub fn render_tree_with<F: FnMut(&mut Scene, &usvg::Node) -> Result<(), E>, E>(
| ^^^^^^^^^^^^^^^^
|
this function takes 2 arguments but 3 arguments were supplied:
crates/components/vector/src/svg_parser.rs#L11
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> crates/components/vector/src/svg_parser.rs:11:20
|
11 | let svg_tree = usvg::Tree::from_data(svg, &usvg::Options::default(), &fontdb)?;
| ^^^^^^^^^^^^^^^^^^^^^ ---------
| | |
| | unexpected argument of type `&usvg::fontdb::Database`
| help: remove the extra argument
|
note: associated function defined here
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/usvg-0.42.0/src/parser/mod.rs:98:12
|
98 | pub fn from_data(data: &[u8], opt: &Options) -> Result<Self, Error> {
| ^^^^^^^^^
|
test-linux
Clippy had exited with the 101 exit code
|
you should consider adding a `Default` implementation for `UiApi`:
crates/components/ui/src/lib.rs#L13
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 + }
|
|
assigning the result of `Clone::clone()` may be inefficient:
crates/components/timecode/src/commands/rename_timecode_control.rs#L26
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
|
assigning the result of `Clone::clone()` may be inefficient:
crates/components/timecode/src/commands/rename_timecode.rs#L26
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
|
assigning the result of `Clone::clone()` may be inefficient:
crates/components/connections/protocols/midi/src/connections.rs#L33
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
|
the borrowed expression implements the required traits:
crates/components/media/src/media_handlers/video_handler.rs#L171
warning: the borrowed expression implements the required traits
--> crates/components/media/src/media_handlers/video_handler.rs:171:20
|
171 | 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
|
you seem to be trying to use `&Box<T>`. Consider using just `&T`:
crates/components/media/src/media_handlers/audio_handler.rs#L99
warning: you seem to be trying to use `&Box<T>`. Consider using just `&T`
--> crates/components/media/src/media_handlers/audio_handler.rs:99:34
|
99 | 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
|
you seem to be trying to use `&Box<T>`. Consider using just `&T`:
crates/components/media/src/media_handlers/audio_handler.rs#L93
warning: you seem to be trying to use `&Box<T>`. Consider using just `&T`
--> crates/components/media/src/media_handlers/audio_handler.rs:93:32
|
93 | 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
|
you seem to be trying to use `&Box<T>`. Consider using just `&T`:
crates/components/media/src/media_handlers/audio_handler.rs#L84
warning: you seem to be trying to use `&Box<T>`. Consider using just `&T`
--> crates/components/media/src/media_handlers/audio_handler.rs:84:29
|
84 | 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
|
you should consider adding a `Default` implementation for `TagId`:
crates/components/media/src/documents/mod.rs#L62
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 + }
|
|
you should consider adding a `Default` implementation for `MediaId`:
crates/components/media/src/documents/mod.rs#L23
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 + }
|
|
associated function `transcode_command` is never used:
crates/components/media/src/media_handlers/video_handler.rs#L46
warning: associated function `transcode_command` is never used
--> crates/components/media/src/media_handlers/video_handler.rs:46:8
|
16 | impl VideoHandler {
| ----------------- associated function in this implementation
...
46 | fn transcode_command<I: AsRef<OsStr>, O: AsRef<OsStr>>(
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
implementation of inherent method `to_string(&self) -> String` for type `profile::ProfileErrors`:
crates/components/connections/protocols/midi/device-profiles/src/profile.rs#L51
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
|
all variants have the same postfix: `Error`:
crates/components/connections/protocols/midi/device-profiles/src/profile.rs#L43
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
|
you should consider adding a `Default` implementation for `WebcamDiscovery`:
crates/components/connections/devices/webcams/src/discovery.rs#L46
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 + }
|
|
this `if let` can be collapsed into the outer `if let`:
crates/components/connections/protocols/pro-dj-link/src/discovery.rs#L85
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
|
using `clone` on type `Ipv4Addr` which implements the `Copy` trait:
crates/components/connections/protocols/dmx/src/commands/add_artnet_input.rs#L29
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
|
using `clone` on type `[u8; 512]` which implements the `Copy` trait:
crates/components/connections/protocols/dmx/src/buffer.rs#L29
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
|
field `thread` is never read:
crates/components/connections/protocols/dmx/src/inputs/artnet.rs#L80
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
|
very complex type used. Consider factoring parts into `type` definitions:
crates/runtime/commander/src/extractors/sub_command.rs#L11
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
|
returning the result of a `let` binding from a block:
crates/runtime/wgpu/src/context.rs#L85
warning: returning the result of a `let` binding from a block
--> crates/runtime/wgpu/src/context.rs:85:9
|
74 | / let texture = self.device.create_texture(&wgpu::TextureDescriptor {
75 | | label,
76 | | size,
77 | | mip_level_count: 1,
... |
82 | | view_formats: &[format],
83 | | });
| |___________- unnecessary `let` binding
84 |
85 | texture
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
74 ~
75 |
76 ~ self.device.create_texture(&wgpu::TextureDescriptor {
77 + label,
78 + size,
79 + mip_level_count: 1,
80 + sample_count: 1,
81 + dimension: wgpu::TextureDimension::D2,
82 + format,
83 + usage,
84 + view_formats: &[format],
85 + })
|
|
unneeded unit expression:
crates/runtime/commander/src/extractors/tuples.rs#L143
warning: unneeded unit expression
--> crates/runtime/commander/src/extractors/tuples.rs:143:9
|
143 | ()
| ^^ help: remove the final `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `#[warn(clippy::unused_unit)]` on by default
|
bound is defined in more than one place:
crates/runtime/module/src/lib.rs#L97
warning: bound is defined in more than one place
--> crates/runtime/module/src/lib.rs:97:24
|
97 | fn block_in_thread<A: 'static, F: Future + 'static>(&self, future_action: A)
| ^
98 | where
99 | A: FnOnce() -> F + Send;
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
= note: `#[warn(clippy::multiple_bound_locations)]` on by default
|
clamp-like pattern without using clamp function:
crates/util/src/conversion.rs#L8
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
|
unneeded unit expression:
crates/runtime/debug-ui/src/noop.rs#L34
warning: unneeded unit expression
--> crates/runtime/debug-ui/src/noop.rs:34:9
|
34 | ()
| ^^ help: remove the final `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
|
unneeded unit expression:
crates/runtime/debug-ui/src/noop.rs#L13
warning: unneeded unit expression
--> crates/runtime/debug-ui/src/noop.rs:13:9
|
13 | ()
| ^^ help: remove the final `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `#[warn(clippy::unused_unit)]` on by default
|
field `0` is never read:
crates/util/bus/src/lib.rs#L134
warning: field `0` is never read
--> crates/util/bus/src/lib.rs:134:37
|
134 | struct SubscriberStream<T: 'static>(Arc<flume::Sender<T>>, RecvStream<'static, T>);
| ---------------- ^^^^^^^^^^^^^^^^^^^^^
| |
| field in this struct
|
= note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
134 | struct SubscriberStream<T: 'static>((), RecvStream<'static, T>);
| ~~
|
test-linux
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
test-linux
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3, actions/cache@v3, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
test-linux
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
test-linux
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
test-linux
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
test-linux
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|