Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(streamer): ♻️ Clarify distinction between bitrate and throughput #2423

Merged
merged 2 commits into from
Sep 27, 2024

Use from_micros(1) instead of from_millis(1) for sanitization

2d234ce
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

refactor(streamer): ♻️ Clarify distinction between bitrate and throughput #2423

Use from_micros(1) instead of from_millis(1) for sanitization
2d234ce
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Sep 26, 2024 in 1s

clippy

20 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 20
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

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 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,
   |         ^^^^^^^^^

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

See this annotation in the file changed.

@github-actions github-actions / clippy

field `system` is never read

warning: field `system` is never read
  --> alvr\client_openxr\src\lib.rs:98:5
   |
96 | pub struct XrContext {
   |            --------- field in this struct
97 |     instance: xr::Instance,
98 |     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 201 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:201:9
    |
201 |     let mut parsed_stream_config = None::<ParsedStreamConfig>;
    |         ----^^^^^^^^^^^^^^^^^^^^
    |         |
    |         help: remove this `mut`

Check warning on line 200 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:200:9
    |
200 |     let mut last_lobby_message = String::new();
    |         ----^^^^^^^^^^^^^^^^^^
    |         |
    |         help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default

Check warning on line 213 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:213:51
    |
213 |         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 213 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:213:30
    |
213 |         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 213 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:213:14
    |
213 |         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 201 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:201:13
    |
201 |     let mut parsed_stream_config = None::<ParsedStreamConfig>;
    |             ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_parsed_stream_config`

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

Check warning on line 133 in alvr\server_core\src\bitrate.rs

See this annotation in the file changed.

@github-actions 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 167 in alvr\client_core\src\graphics\mod.rs

See this annotation in the file changed.

@github-actions 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 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 73 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:73:9
   |
72 |     DecoderConfig {
   |     ------------- field in this variant
73 |         codec: AlvrCodec,
   |         ^^^^^

Check warning on line 66 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:66:9
   |
65 |     Haptics {
   |     ------- fields in this variant
66 |         device_id: u64,
   |         ^^^^^^^^^
67 |         duration_s: f32,
   |         ^^^^^^^^^^
68 |         frequency: f32,
   |         ^^^^^^^^^
69 |         amplitude: f32,
   |         ^^^^^^^^^

Check warning on line 59 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:59:9
   |
58 |     StreamingStarted {
   |     ---------------- fields in this variant
59 |         view_width: u32,
   |         ^^^^^^^^^^
60 |         view_height: u32,
   |         ^^^^^^^^^^^
61 |         refresh_rate_hint: f32,
   |         ^^^^^^^^^^^^^^^^^
62 |         enable_foveated_encoding: bool,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 15 in alvr\client_core\src\graphics\mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused imports: `InstanceDescriptor` and `InstanceFlags`

warning: unused imports: `InstanceDescriptor` and `InstanceFlags`
  --> alvr\client_core\src\graphics\mod.rs:15:42
   |
15 |     Adapter, Device, Extent3d, Instance, InstanceDescriptor, InstanceFlags, Queue, Texture,
   |                                          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^

Check warning on line 12 in alvr\client_core\src\graphics\mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `mem`

warning: unused import: `mem`
  --> alvr\client_core\src\graphics\mod.rs:12:24
   |
12 | use std::{ffi::c_void, mem, num::NonZeroU32, ptr};
   |                        ^^^
   |
   = note: `#[warn(unused_imports)]` 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