fix(client_core): 🐛 Fix rendering C API #4568
rust.yml
on: pull_request
check-windows
5m 37s
check-linux
3m 15s
check-macos
58s
build-android
1m 50s
tests
50s
check-format
16s
check-msrv-windows
4m 56s
check-msrv-linux
4m 11s
Annotations
20 warnings
check-linux:
alvr/common/src/logging.rs#L217
warning: the borrowed expression implements the required traits
--> alvr/common/src/logging.rs:217:30
|
217 | .set_description(&w.to_string())
| ^^^^^^^^^^^^^^ help: change this to: `w.to_string()`
|
= 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-linux:
alvr/xtask/src/packaging.rs#L20
warning: function `build_windows_installer` is never used
--> alvr/xtask/src/packaging.rs:20:4
|
20 | fn build_windows_installer() {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
check-linux:
alvr/audio/src/linux.rs#L220
warning: this returns a `Result<_, ()>`
--> alvr/audio/src/linux.rs:220:1
|
220 | / pub fn record_audio_blocking_pipewire(
221 | | is_running: Arc<dyn Fn() -> bool + Send + Sync>,
222 | | sender: StreamSender<()>,
223 | | channels_count: u16,
224 | | sample_rate: u32,
225 | | ) -> Result<(), ()> {
| |___________________^
|
= help: use a custom `Error` type instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
= note: `#[warn(clippy::result_unit_err)]` on by default
|
check-linux:
alvr/client_core/src/c_api.rs#L62
warning: fields `view_width`, `view_height`, `refresh_rate_hint`, `encoding_gamma`, `enable_foveated_encoding`, and `enable_hdr` are never read
--> alvr/client_core/src/c_api.rs:62:9
|
61 | StreamingStarted {
| ---------------- fields in this variant
62 | view_width: u32,
| ^^^^^^^^^^
63 | view_height: u32,
| ^^^^^^^^^^^
64 | refresh_rate_hint: f32,
| ^^^^^^^^^^^^^^^^^
65 | encoding_gamma: f32,
| ^^^^^^^^^^^^^^
66 | enable_foveated_encoding: bool,
| ^^^^^^^^^^^^^^^^^^^^^^^^
67 | enable_hdr: bool,
| ^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
check-linux:
alvr/client_core/src/c_api.rs#L71
warning: fields `device_id`, `duration_s`, `frequency`, and `amplitude` are never read
--> alvr/client_core/src/c_api.rs:71:9
|
70 | Haptics {
| ------- fields in this variant
71 | device_id: u64,
| ^^^^^^^^^
72 | duration_s: f32,
| ^^^^^^^^^^
73 | frequency: f32,
| ^^^^^^^^^
74 | amplitude: f32,
| ^^^^^^^^^
|
check-linux:
alvr/client_core/src/c_api.rs#L78
warning: field `codec` is never read
--> alvr/client_core/src/c_api.rs:78:9
|
77 | DecoderConfig {
| ------------- field in this variant
78 | codec: AlvrCodec,
| ^^^^^
|
check-linux:
alvr/client_core/src/c_api.rs#L902
warning: variants `Float`, `Int32`, `Int64`, and `String` are never constructed
--> alvr/client_core/src/c_api.rs:902:5
|
901 | pub enum AlvrMediacodecPropType {
| ---------------------- variants in this enum
902 | Float,
| ^^^^^
903 | Int32,
| ^^^^^
904 | Int64,
| ^^^^^
905 | String,
| ^^^^^^
|
check-linux:
alvr/client_core/src/connection.rs#L65
warning: very complex type used. Consider factoring parts into `type` definitions
--> alvr/client_core/src/connection.rs:65:27
|
65 | 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-linux:
alvr/client_core/src/lib.rs#L312
warning: very complex type used. Consider factoring parts into `type` definitions
--> alvr/client_core/src/lib.rs:312:19
|
312 | 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-linux:
alvr/client_core/src/lib.rs#L364
warning: returning the result of a `let` binding from a block
--> alvr/client_core/src/lib.rs:364:9
|
353 | / let view_params = [
354 | | ViewParams {
355 | | pose: head_pose * view_params[0].pose,
356 | | fov: view_params[0].fov,
... |
361 | | },
362 | | ];
| |__________- unnecessary `let` binding
363 |
364 | 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
|
353 ~
354 |
355 ~ [
356 + ViewParams {
357 + pose: head_pose * view_params[0].pose,
358 + fov: view_params[0].fov,
359 + },
360 + ViewParams {
361 + pose: head_pose * view_params[1].pose,
362 + fov: view_params[1].fov,
363 + },
364 + ]
|
|
check-windows:
alvr/common/src/logging.rs#L217
warning: the borrowed expression implements the required traits
--> alvr\common\src\logging.rs:217:30
|
217 | .set_description(&w.to_string())
| ^^^^^^^^^^^^^^ help: change this to: `w.to_string()`
|
= 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-windows:
alvr/xtask/src/packaging.rs#L20
warning: function `build_windows_installer` is never used
--> alvr\xtask\src\packaging.rs:20:4
|
20 | fn build_windows_installer() {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
check-windows:
alvr/client_core/src/graphics/mod.rs#L14
warning: unused import: `mem`
--> alvr\client_core\src\graphics\mod.rs:14:24
|
14 | use std::{ffi::c_void, mem, num::NonZeroU32, ptr};
| ^^^
|
= note: `#[warn(unused_imports)]` on by default
|
check-windows:
alvr/client_core/src/graphics/mod.rs#L17
warning: unused imports: `InstanceDescriptor` and `InstanceFlags`
--> alvr\client_core\src\graphics\mod.rs:17:42
|
17 | Adapter, Device, Extent3d, Instance, InstanceDescriptor, InstanceFlags, Queue, Texture,
| ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
|
check-windows:
alvr/client_core/src/c_api.rs#L62
warning: fields `view_width`, `view_height`, `refresh_rate_hint`, `encoding_gamma`, `enable_foveated_encoding`, and `enable_hdr` are never read
--> alvr\client_core\src\c_api.rs:62:9
|
61 | StreamingStarted {
| ---------------- fields in this variant
62 | view_width: u32,
| ^^^^^^^^^^
63 | view_height: u32,
| ^^^^^^^^^^^
64 | refresh_rate_hint: f32,
| ^^^^^^^^^^^^^^^^^
65 | encoding_gamma: f32,
| ^^^^^^^^^^^^^^
66 | enable_foveated_encoding: bool,
| ^^^^^^^^^^^^^^^^^^^^^^^^
67 | enable_hdr: bool,
| ^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
check-windows:
alvr/client_core/src/c_api.rs#L71
warning: fields `device_id`, `duration_s`, `frequency`, and `amplitude` are never read
--> alvr\client_core\src\c_api.rs:71:9
|
70 | Haptics {
| ------- fields in this variant
71 | device_id: u64,
| ^^^^^^^^^
72 | duration_s: f32,
| ^^^^^^^^^^
73 | frequency: f32,
| ^^^^^^^^^
74 | amplitude: f32,
| ^^^^^^^^^
|
check-windows:
alvr/client_core/src/c_api.rs#L78
warning: field `codec` is never read
--> alvr\client_core\src\c_api.rs:78:9
|
77 | DecoderConfig {
| ------------- field in this variant
78 | codec: AlvrCodec,
| ^^^^^
|
check-windows:
alvr/client_core/src/c_api.rs#L902
warning: variants `Float`, `Int32`, `Int64`, and `String` are never constructed
--> alvr\client_core\src\c_api.rs:902:5
|
901 | pub enum AlvrMediacodecPropType {
| ---------------------- variants in this enum
902 | Float,
| ^^^^^
903 | Int32,
| ^^^^^
904 | Int64,
| ^^^^^
905 | String,
| ^^^^^^
|
check-windows:
alvr/client_core/src/graphics/mod.rs#L192
warning: fields `adapter` and `dummy_surface` are never read
--> alvr\client_core\src\graphics\mod.rs:192:5
|
190 | pub struct GraphicsContext {
| --------------- fields in this struct
191 | _instance: Instance,
192 | adapter: Adapter,
| ^^^^^^^
...
199 | dummy_surface: egl::Surface,
| ^^^^^^^^^^^^^
|
check-windows:
alvr/client_core/src/connection.rs#L65
warning: very complex type used. Consider factoring parts into `type` definitions
--> alvr\client_core\src\connection.rs:65:27
|
65 | 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
|