Skip to content

refactor(client_openxr): ♻️ Remove some session.clone()s #831

refactor(client_openxr): ♻️ Remove some session.clone()s

refactor(client_openxr): ♻️ Remove some session.clone()s #831

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

clippy

18 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 18
Note 0
Help 0

Versions

  • rustc 1.80.1 (3f5fd8dd4 2024-08-06)
  • cargo 1.80.1 (376290515 2024-07-16)
  • clippy 0.1.80 (3f5fd8dd 2024-08-06)

Annotations

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 missing indentation

warning: doc list item missing 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:
    |     ++

Check warning on line 486 in alvr/client_core/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item missing indentation

warning: doc list item missing indentation
   --> alvr/client_core/src/c_api.rs:486:5
    |
486 | /// hand_skeleton:
    |     ^
    |
    = 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
    = note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
    |
486 | ///   hand_skeleton:
    |     ++

Check warning on line 7 in alvr/client_core/src/decoder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

fields `codec`, `force_software_decoder`, `max_buffering_frames`, `buffering_history_weight`, `options`, and `config_buffer` are never read

warning: fields `codec`, `force_software_decoder`, `max_buffering_frames`, `buffering_history_weight`, `options`, and `config_buffer` are never read
  --> alvr/client_core/src/decoder.rs:7:9
   |
6  | pub struct DecoderConfig {
   |            ------------- fields in this struct
7  |     pub codec: CodecType,
   |         ^^^^^
8  |     pub force_software_decoder: bool,
   |         ^^^^^^^^^^^^^^^^^^^^^^
9  |     pub max_buffering_frames: f32,
   |         ^^^^^^^^^^^^^^^^^^^^
10 |     pub buffering_history_weight: f32,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^
11 |     pub options: Vec<(String, MediacodecDataType)>,
   |         ^^^^^^^
12 |     pub config_buffer: Vec<u8>,
   |         ^^^^^^^^^^^^^
   |
   = note: `DecoderConfig` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis

Check warning on line 72 in alvr/client_core/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `codec` is never read

warning: field `codec` is never read
  --> alvr/client_core/src/c_api.rs:72:9
   |
71 |     DecoderConfig {
   |     ------------- field in this variant
72 |         codec: AlvrCodec,
   |         ^^^^^

Check warning on line 65 in alvr/client_core/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

fields `device_id`, `duration_s`, `frequency`, and `amplitude` are never read

warning: fields `device_id`, `duration_s`, `frequency`, and `amplitude` are never read
  --> alvr/client_core/src/c_api.rs:65:9
   |
64 |     Haptics {
   |     ------- fields in this variant
65 |         device_id: u64,
   |         ^^^^^^^^^
66 |         duration_s: f32,
   |         ^^^^^^^^^^
67 |         frequency: f32,
   |         ^^^^^^^^^
68 |         amplitude: f32,
   |         ^^^^^^^^^

Check warning on line 58 in alvr/client_core/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

fields `view_width`, `view_height`, `refresh_rate_hint`, and `enable_foveated_encoding` are never read

warning: fields `view_width`, `view_height`, `refresh_rate_hint`, and `enable_foveated_encoding` are never read
  --> alvr/client_core/src/c_api.rs:58:9
   |
57 |     StreamingStarted {
   |     ---------------- fields in this variant
58 |         view_width: u32,
   |         ^^^^^^^^^^
59 |         view_height: u32,
   |         ^^^^^^^^^^^
60 |         refresh_rate_hint: f32,
   |         ^^^^^^^^^^^^^^^^^
61 |         enable_foveated_encoding: bool,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 13 in alvr/xtask/src/packaging.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `build_windows_installer` is never used

warning: function `build_windows_installer` is never used
  --> alvr/xtask/src/packaging.rs:13:4
   |
13 | fn build_windows_installer() {
   |    ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default