refactor(client): ♻️ Move decoder out of ClientCoreContext; fi… #4325
clippy
32 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 32 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.81.0 (eeb90cda1 2024-09-04)
- cargo 1.81.0 (2dbb1af80 2024-08-20)
- clippy 0.1.81 (eeb90cda 2024-09-04)
Annotations
Check warning on line 8 in alvr\dashboard\src\dashboard\components\settings_controls\notice.rs
github-actions / clippy
function `notice` is never used
warning: function `notice` is never used
--> alvr\dashboard\src\dashboard\components\settings_controls\notice.rs:8:8
|
8 | pub fn notice(ui: &mut Ui, text: &str) {
| ^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 22 in alvr\dashboard\src\dashboard\components\settings_controls\up_down.rs
github-actions / clippy
use of deprecated method `eframe::egui::Ui::add_visible_ui`: Use 'ui.scope_builder' instead
warning: use of deprecated method `eframe::egui::Ui::add_visible_ui`: Use 'ui.scope_builder' instead
--> alvr\dashboard\src\dashboard\components\settings_controls\up_down.rs:22:14
|
22 | .add_visible_ui(index < count - 1, |ui| ui.small_button("⬇"))
| ^^^^^^^^^^^^^^
Check warning on line 18 in alvr\dashboard\src\dashboard\components\settings_controls\up_down.rs
github-actions / clippy
use of deprecated method `eframe::egui::Ui::add_visible_ui`: Use 'ui.scope_builder' instead
warning: use of deprecated method `eframe::egui::Ui::add_visible_ui`: Use 'ui.scope_builder' instead
--> alvr\dashboard\src\dashboard\components\settings_controls\up_down.rs:18:14
|
18 | .add_visible_ui(index > 0, |ui| ui.small_button("⬆"))
| ^^^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
Check warning on line 133 in alvr\server_core\src\bitrate.rs
github-actions / clippy
casting to the same type is unnecessary (`f32` -> `f32`)
warning: casting to the same type is unnecessary (`f32` -> `f32`)
--> alvr\server_core\src\bitrate.rs:133:25
|
133 | self.packet_bytes_average.get_average() as f32,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.packet_bytes_average.get_average()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
Check warning on line 437 in alvr\client_openxr\src\interaction.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> alvr\client_openxr\src\interaction.rs:437:13
|
437 | &reference_space,
| ^^^^^^^^^^^^^^^^ help: change this to: `reference_space`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 423 in alvr\client_openxr\src\interaction.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> alvr\client_openxr\src\interaction.rs:423:17
|
423 | .relate(&reference_space, crate::to_xr_time(target_timestamp))
| ^^^^^^^^^^^^^^^^ help: change this to: `reference_space`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Check warning on line 28 in alvr\client_openxr\src\interaction.rs
github-actions / clippy
fields `aim_action` and `aim_space` are never read
warning: fields `aim_action` and `aim_space` are never read
--> alvr\client_openxr\src\interaction.rs:28:9
|
24 | pub struct HandInteraction {
| --------------- fields in this struct
...
28 | pub aim_action: xr::Action<xr::Posef>,
| ^^^^^^^^^^
29 | pub aim_space: xr::Space,
| ^^^^^^^^^
Check warning on line 90 in alvr\client_openxr\src\lib.rs
github-actions / clippy
field `system` is never read
warning: field `system` is never read
--> alvr\client_openxr\src\lib.rs:90:5
|
88 | pub struct XrContext {
| --------- field in this struct
89 | instance: xr::Instance,
90 | system: xr::SystemId,
| ^^^^^^
|
= note: `XrContext` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
Check warning on line 193 in alvr\client_openxr\src\lib.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> alvr\client_openxr\src\lib.rs:193:9
|
193 | let mut parsed_stream_config = None::<ParsedStreamConfig>;
| ----^^^^^^^^^^^^^^^^^^^^
| |
| help: remove this `mut`
Check warning on line 192 in alvr\client_openxr\src\lib.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> alvr\client_openxr\src\lib.rs:192:9
|
192 | let mut last_lobby_message = String::new();
| ----^^^^^^^^^^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
Check warning on line 205 in alvr\client_openxr\src\lib.rs
github-actions / clippy
unused variable: `xr_frame_stream`
warning: unused variable: `xr_frame_stream`
--> alvr\client_openxr\src\lib.rs:205:51
|
205 | let (xr_session, mut xr_frame_waiter, mut xr_frame_stream) = unsafe {
| ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_xr_frame_stream`
Check warning on line 205 in alvr\client_openxr\src\lib.rs
github-actions / clippy
unused variable: `xr_frame_waiter`
warning: unused variable: `xr_frame_waiter`
--> alvr\client_openxr\src\lib.rs:205:30
|
205 | let (xr_session, mut xr_frame_waiter, mut xr_frame_stream) = unsafe {
| ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_xr_frame_waiter`
Check warning on line 205 in alvr\client_openxr\src\lib.rs
github-actions / clippy
unused variable: `xr_session`
warning: unused variable: `xr_session`
--> alvr\client_openxr\src\lib.rs:205:14
|
205 | let (xr_session, mut xr_frame_waiter, mut xr_frame_stream) = unsafe {
| ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_xr_session`
Check warning on line 193 in alvr\client_openxr\src\lib.rs
github-actions / clippy
unused variable: `parsed_stream_config`
warning: unused variable: `parsed_stream_config`
--> alvr\client_openxr\src\lib.rs:193:13
|
193 | let mut parsed_stream_config = None::<ParsedStreamConfig>;
| ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_parsed_stream_config`
Check warning on line 192 in alvr\client_openxr\src\lib.rs
github-actions / clippy
unused variable: `last_lobby_message`
warning: unused variable: `last_lobby_message`
--> alvr\client_openxr\src\lib.rs:192:13
|
192 | let mut last_lobby_message = String::new();
| ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_last_lobby_message`
|
= note: `#[warn(unused_variables)]` on by default
Check warning on line 211 in alvr\client_openxr\src\lib.rs
github-actions / clippy
unreachable definition
warning: unreachable definition
--> alvr\client_openxr\src\lib.rs:211:13
|
207 | .create_session(xr_system, &graphics::session_create_info(&graphics_context))
| ------------------------------------------------ any code following this expression is unreachable
...
211 | let xr_context = XrContext {
| ^^^^^^^^^^ unreachable definition
|
note: this expression has type `openxr::opengles::SessionCreateInfo`, which is uninhabited
--> alvr\client_openxr\src\lib.rs:207:45
|
207 | .create_session(xr_system, &graphics::session_create_info(&graphics_context))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `#[warn(unreachable_code)]` on by default
Check warning on line 158 in alvr\client_mock\src/main.rs
github-actions / clippy
using `clone` on type `ViewParams` which implements the `Copy` trait
warning: using `clone` on type `ViewParams` which implements the `Copy` trait
--> alvr\client_mock\src/main.rs:158:31
|
158 | context.send_view_params([views_params.clone(), views_params]);
| ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `views_params`
|
= 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 375 in alvr\client_core\src\lib.rs
github-actions / clippy
returning the result of a `let` binding from a block
warning: returning the result of a `let` binding from a block
--> alvr\client_core\src\lib.rs:375:9
|
364 | / let view_params = [
365 | | ViewParams {
366 | | pose: head_pose * view_params[0].pose,
367 | | fov: view_params[0].fov,
... |
372 | | },
373 | | ];
| |__________- unnecessary `let` binding
374 |
375 | view_params
| ^^^^^^^^^^^
|
= 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
|
364 ~
365 |
366 ~ [
367 + ViewParams {
368 + pose: head_pose * view_params[0].pose,
369 + fov: view_params[0].fov,
370 + },
371 + ViewParams {
372 + pose: head_pose * view_params[1].pose,
373 + fov: view_params[1].fov,
374 + },
375 + ]
|
Check warning on line 323 in alvr\client_core\src\lib.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> alvr\client_core\src\lib.rs:323:19
|
323 | callback: Box<dyn FnMut(Duration, &[u8]) -> bool + Send>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 66 in alvr\client_core\src\connection.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> alvr\client_core\src\connection.rs:66:27
|
66 | pub decoder_callback: Mutex<Option<Box<dyn FnMut(Duration, &[u8]) -> bool + Send>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
Check warning on line 646 in alvr\client_core\src\c_api.rs
github-actions / clippy
casting to the same type is unnecessary (`u64` -> `u64`)
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> alvr\client_core\src\c_api.rs:646:66
|
646 | context.report_compositor_start(Duration::from_nanos(target_timestamp_ns as u64));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `target_timestamp_ns`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 626 in alvr\client_core\src\c_api.rs
github-actions / clippy
casting to the same type is unnecessary (`u64` -> `u64`)
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> alvr\client_core\src\c_api.rs:626:59
|
626 | context.report_frame_decoded(Duration::from_nanos(target_timestamp_ns as u64));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `target_timestamp_ns`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
Check warning on line 167 in alvr\client_core\src\graphics\mod.rs
github-actions / clippy
fields `adapter` and `dummy_surface` are never read
warning: fields `adapter` and `dummy_surface` are never read
--> alvr\client_core\src\graphics\mod.rs:167:5
|
165 | pub struct GraphicsContext {
| --------------- fields in this struct
166 | _instance: Instance,
167 | adapter: Adapter,
| ^^^^^^^
...
174 | dummy_surface: egl::Surface,
| ^^^^^^^^^^^^^
Check warning on line 831 in alvr\client_core\src\c_api.rs
github-actions / clippy
variants `Float`, `Int32`, `Int64`, and `String` are never constructed
warning: variants `Float`, `Int32`, `Int64`, and `String` are never constructed
--> alvr\client_core\src\c_api.rs:831:5
|
830 | pub enum AlvrMediacodecPropType {
| ---------------------- variants in this enum
831 | Float,
| ^^^^^
832 | Int32,
| ^^^^^
833 | Int64,
| ^^^^^
834 | String,
| ^^^^^^
Check warning on line 71 in alvr\client_core\src\c_api.rs
github-actions / clippy
field `codec` is never read
warning: field `codec` is never read
--> alvr\client_core\src\c_api.rs:71:9
|
70 | DecoderConfig {
| ------------- field in this variant
71 | codec: AlvrCodec,
| ^^^^^