Skip to content

zarik staging

zarik staging #4259

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

clippy

34 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 34
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 416 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:408:25
    |
408 |               ui[1].label(&format!(
    |  _________________________^
409 | |                 "{}% ({})",
410 | |                 statistics.battery_hmd,
411 | |                 if statistics.hmd_plugged {
...   |
415 | |                 }
416 | |             ));
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
    |
408 ~             ui[1].label(format!(
409 +                 "{}% ({})",
410 +                 statistics.battery_hmd,
411 +                 if statistics.hmd_plugged {
412 +                     "plugged"
413 +                 } else {
414 +                     "unplugged"
415 +                 }
416 ~             ));
    |

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

Check warning on line 393 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:393:25
    |
393 |             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 390 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:390:25
    |
390 |             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 387 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:387:25
    |
387 |             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 384 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:384:25
    |
384 |             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 381 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:381:25
    |
381 |             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 378 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:378:25
    |
378 |             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 375 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:372:25
    |
372 |               ui[1].label(&format!(
    |  _________________________^
373 | |                 "{} packets ({} packets/s)",
374 | |                 statistics.video_packets_total, statistics.video_packets_per_sec
375 | |             ));
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
    |
372 ~             ui[1].label(format!(
373 +                 "{} packets ({} packets/s)",
374 +                 statistics.video_packets_total, statistics.video_packets_per_sec
375 ~             ));
    |

Check warning on line 324 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:324:49
    |
324 |                         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 166 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:166:49
    |
166 |                         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 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 stream_config = None::<StreamConfig>;
    |         ----^^^^^^^^^^^^^
    |         |
    |         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: `stream_config`

warning: unused variable: `stream_config`
   --> alvr\client_openxr\src\lib.rs:204:13
    |
204 |     let mut stream_config = None::<StreamConfig>;
    |             ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_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

Check warning on line 489 in alvr\client_core\src\c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item without indentation

warning: doc list item without indentation
   --> alvr\client_core\src\c_api.rs:489:5
    |
489 | /// eye_gazes:
    |     ^
    |
    = help: if this is supposed to be its own paragraph, add a blank line
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
    |
489 | ///   eye_gazes:
    |     ++