Skip to content

fix(server_openvr): 🐛 Fix hand tracking when using Disabled inter… #844

fix(server_openvr): 🐛 Fix hand tracking when using Disabled inter…

fix(server_openvr): 🐛 Fix hand tracking when using Disabled inter… #844

GitHub Actions / clippy succeeded Sep 18, 2024 in 0s

clippy

37 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 37
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 421 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:413:25
    |
413 |               ui[1].label(&format!(
    |  _________________________^
414 | |                 "{}% ({})",
415 | |                 statistics.battery_hmd,
416 | |                 if statistics.hmd_plugged {
...   |
420 | |                 }
421 | |             ));
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
    |
413 ~             ui[1].label(format!(
414 +                 "{}% ({})",
415 +                 statistics.battery_hmd,
416 +                 if statistics.hmd_plugged {
417 +                     "plugged"
418 +                 } else {
419 +                     "unplugged"
420 +                 }
421 ~             ));
    |

Check warning on line 410 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:410:25
    |
410 |             ui[1].label(&format!("{} FPS", statistics.server_fps));
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{} FPS", statistics.server_fps)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 407 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:407:25
    |
407 |             ui[1].label(&format!("{} FPS", statistics.client_fps));
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{} FPS", statistics.client_fps)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 404 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:401:25
    |
401 |               ui[1].label(&format!(
    |  _________________________^
402 | |                 "{} packets ({} packets/s)",
403 | |                 statistics.packets_lost_total, statistics.packets_lost_per_sec
404 | |             ));
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
    |
401 ~             ui[1].label(format!(
402 +                 "{} packets ({} packets/s)",
403 +                 statistics.packets_lost_total, statistics.packets_lost_per_sec
404 ~             ));
    |

Check warning on line 398 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:398:25
    |
398 |             ui[1].label(&format!("{:.2} ms", statistics.decode_latency_ms));
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{:.2} ms", statistics.decode_latency_ms)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 395 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:395:25
    |
395 |             ui[1].label(&format!("{:.2} ms", statistics.network_latency_ms));
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{:.2} ms", statistics.network_latency_ms)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 392 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:392:25
    |
392 |             ui[1].label(&format!("{:.2} ms", statistics.encode_latency_ms));
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{:.2} ms", statistics.encode_latency_ms)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 389 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:389:25
    |
389 |             ui[1].label(&format!("{:.0} ms", statistics.total_latency_ms));
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{:.0} ms", statistics.total_latency_ms)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 386 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:386:25
    |
386 |             ui[1].label(&format!("{:.1} Mbps", statistics.video_mbits_per_sec));
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{:.1} Mbps", statistics.video_mbits_per_sec)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 383 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:383:25
    |
383 |             ui[1].label(&format!("{} MB", statistics.video_mbytes_total));
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{} MB", statistics.video_mbytes_total)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 380 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:377:25
    |
377 |               ui[1].label(&format!(
    |  _________________________^
378 | |                 "{} packets ({} packets/s)",
379 | |                 statistics.video_packets_total, statistics.video_packets_per_sec
380 | |             ));
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
    |
377 ~             ui[1].label(format!(
378 +                 "{} packets ({} packets/s)",
379 +                 statistics.video_packets_total, statistics.video_packets_per_sec
380 ~             ));
    |

Check warning on line 329 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:329:49
    |
329 |                         ui.colored_label(color, &format!("{text}: {:.2} Mbps", value / 1e6));
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{text}: {:.2} Mbps", value / 1e6)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 171 in alvr\dashboard\src\dashboard\components\statistics.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
   --> alvr\dashboard\src\dashboard\components\statistics.rs:171:49
    |
171 |                         ui.colored_label(color, &format!("{:.2}ms", value_s * 1000.0));
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{:.2}ms", value_s * 1000.0)`
    |
    = 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 8 in alvr\dashboard\src\dashboard\components\settings_controls\notice.rs

See this annotation in the file changed.

@github-actions 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 360 in alvr\client_openxr\src\lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

deref which would be done by auto-deref

warning: deref which would be done by auto-deref
   --> alvr\client_openxr\src\lib.rs:360:66
    |
360 |                         let new_config = ParsedStreamConfig::new(&*config);
    |                                                                  ^^^^^^^^ help: try: `&config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
    = note: `#[warn(clippy::explicit_auto_deref)]` on by default

Check warning on line 48 in alvr\client_openxr\src\extra_extensions\mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

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

warning: using `clone` on type `Instance` which implements the `Copy` trait
  --> alvr\client_openxr\src\extra_extensions\mod.rs:48:33
   |
48 |             base_function_ptrs: instance.fp().clone(),
   |                                 ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*instance.fp()`
   |
   = 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 26 in alvr\client_openxr\src\interaction.rs

See this annotation in the file changed.

@github-actions 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:26:9
   |
22 | pub struct HandInteraction {
   |            --------------- fields in this struct
...
26 |     pub aim_action: xr::Action<xr::Posef>,
   |         ^^^^^^^^^^
27 |     pub aim_space: xr::Space,
   |         ^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 204 in alvr\client_openxr\src\lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> alvr\client_openxr\src\lib.rs:204:9
    |
204 |     let mut parsed_stream_config = None::<ParsedStreamConfig>;
    |         ----^^^^^^^^^^^^^^^^^^^^
    |         |
    |         help: remove this `mut`

Check warning on line 203 in alvr\client_openxr\src\lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> alvr\client_openxr\src\lib.rs:203:9
    |
203 |     let mut last_lobby_message = String::new();
    |         ----^^^^^^^^^^^^^^^^^^
    |         |
    |         help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default

Check warning on line 216 in alvr\client_openxr\src\lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `xr_frame_stream`

warning: unused variable: `xr_frame_stream`
   --> alvr\client_openxr\src\lib.rs:216:51
    |
216 |         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 216 in alvr\client_openxr\src\lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `xr_frame_waiter`

warning: unused variable: `xr_frame_waiter`
   --> alvr\client_openxr\src\lib.rs:216:30
    |
216 |         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 216 in alvr\client_openxr\src\lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `xr_session`

warning: unused variable: `xr_session`
   --> alvr\client_openxr\src\lib.rs:216:14
    |
216 |         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 204 in alvr\client_openxr\src\lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `parsed_stream_config`

warning: unused variable: `parsed_stream_config`
   --> alvr\client_openxr\src\lib.rs:204:13
    |
204 |     let mut parsed_stream_config = None::<ParsedStreamConfig>;
    |             ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_parsed_stream_config`

Check warning on line 203 in alvr\client_openxr\src\lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `last_lobby_message`

warning: unused variable: `last_lobby_message`
   --> alvr\client_openxr\src\lib.rs:203:13
    |
203 |     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 222 in alvr\client_openxr\src\lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unreachable definition

warning: unreachable definition
   --> alvr\client_openxr\src\lib.rs:222:13
    |
218 |                 .create_session(xr_system, &graphics::session_create_info(&graphics_context))
    |                                             ------------------------------------------------ any code following this expression is unreachable
...
222 |         let xr_context = XrContext {
    |             ^^^^^^^^^^ unreachable definition
    |
note: this expression has type `openxr::opengles::SessionCreateInfo`, which is uninhabited
   --> alvr\client_openxr\src\lib.rs:218:45
    |
218 |                 .create_session(xr_system, &graphics::session_create_info(&graphics_context))
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: `#[warn(unreachable_code)]` on by default