Skip to content

feat(server): :sparkles: Define draft libalvr API

Sign in for the full log view
GitHub Actions / clippy succeeded Oct 13, 2023 in 0s

clippy

35 warnings

Details

Results

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

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check warning on line 156 in alvr/server/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of `bool::then` in `filter_map`

warning: usage of `bool::then` in `filter_map`
   --> alvr/server/src/lib.rs:150:14
    |
150 |               .filter_map(|(hostname, info)| {
    |  ______________^
151 | |                 (!matches!(
152 | |                     info.connection_state,
153 | |                     ConnectionState::Disconnected | ConnectionState::Disconnecting { .. }
154 | |                 ))
155 | |                 .then(|| hostname.clone())
156 | |             })
    | |______________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_bool_then
    = note: `#[warn(clippy::filter_map_bool_then)]` on by default
help: use `filter` then `map` instead
    |
150 ~             .filter(|&(hostname, info)| (!matches!(
151 +                     info.connection_state,
152 +                     ConnectionState::Disconnected | ConnectionState::Disconnecting { .. }
153 +                 ))).map(|(hostname, info)| hostname.clone())
    |

Check warning on line 105 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variants `Battery`, `Bounds`, `Restart`, and `Shutdown` are never constructed

warning: variants `Battery`, `Bounds`, `Restart`, and `Shutdown` are never constructed
   --> alvr/server/src/c_api.rs:105:5
    |
104 | pub enum AlvrEvent {
    |          --------- variants in this enum
105 |     Battery(AlvrBatteryValue),
    |     ^^^^^^^
106 |     Bounds([f32; 2]),
    |     ^^^^^^
107 |     Restart,
    |     ^^^^^^^
108 |     Shutdown,
    |     ^^^^^^^^

Check warning on line 88 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variant `Haptics` is never constructed

warning: variant `Haptics` is never constructed
  --> alvr/server/src/c_api.rs:88:5
   |
87 | pub enum AlvrOutput {
   |          ---------- variant in this enum
88 |     Haptics {
   |     ^^^^^^^
   |
   = note: `AlvrOutput` 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 259 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `timestamp_ns`

warning: unused variable: `timestamp_ns`
   --> alvr/server/src/c_api.rs:259:5
    |
259 |     timestamp_ns: u64,
    |     ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_timestamp_ns`

Check warning on line 258 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `timeline_semaphore_value`

warning: unused variable: `timeline_semaphore_value`
   --> alvr/server/src/c_api.rs:258:5
    |
258 |     timeline_semaphore_value: u64,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_timeline_semaphore_value`

Check warning on line 257 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `swapchain_index`

warning: unused variable: `swapchain_index`
   --> alvr/server/src/c_api.rs:257:5
    |
257 |     swapchain_index: u64,
    |     ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_swapchain_index`

Check warning on line 256 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `queue`

warning: unused variable: `queue`
   --> alvr/server/src/c_api.rs:256:5
    |
256 |     queue: vk::Queue,
    |     ^^^^^ help: if this is intentional, prefix it with an underscore: `_queue`

Check warning on line 250 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `out_swapchain_index`

warning: unused variable: `out_swapchain_index`
   --> alvr/server/src/c_api.rs:250:45
    |
250 | pub unsafe extern "C" fn alvr_acquire_image(out_swapchain_index: u64) -> vk::Result {
    |                                             ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_out_swapchain_index`

Check warning on line 244 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `image_count`

warning: unused variable: `image_count`
   --> alvr/server/src/c_api.rs:244:5
    |
244 |     image_count: u64,
    |     ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_image_count`

Check warning on line 243 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `present_mode`

warning: unused variable: `present_mode`
   --> alvr/server/src/c_api.rs:243:5
    |
243 |     present_mode: vk::PresentModeKHR,
    |     ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_present_mode`

Check warning on line 242 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `image_usage`

warning: unused variable: `image_usage`
   --> alvr/server/src/c_api.rs:242:5
    |
242 |     image_usage: vk::ImageUsageFlags,
    |     ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_image_usage`

Check warning on line 241 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `color_space`

warning: unused variable: `color_space`
   --> alvr/server/src/c_api.rs:241:5
    |
241 |     color_space: vk::ColorSpaceKHR,
    |     ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_color_space`

Check warning on line 240 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `color_format`

warning: unused variable: `color_format`
   --> alvr/server/src/c_api.rs:240:5
    |
240 |     color_format: vk::Format,
    |     ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_color_format`

Check warning on line 239 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `height`

warning: unused variable: `height`
   --> alvr/server/src/c_api.rs:239:5
    |
239 |     height: u32,
    |     ^^^^^^ help: if this is intentional, prefix it with an underscore: `_height`

Check warning on line 238 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `width`

warning: unused variable: `width`
   --> alvr/server/src/c_api.rs:238:5
    |
238 |     width: u32,
    |     ^^^^^ help: if this is intentional, prefix it with an underscore: `_width`

Check warning on line 214 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `device_id`

warning: unused variable: `device_id`
   --> alvr/server/src/c_api.rs:214:46
    |
214 | pub unsafe extern "C" fn alvr_destroy_device(device_id: u64) {
    |                                              ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_device_id`

Check warning on line 208 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `out_relative_pose_arr`

warning: unused variable: `out_relative_pose_arr`
   --> alvr/server/src/c_api.rs:208:5
    |
208 |     out_relative_pose_arr: *mut AlvrPose, // 2 elements
    |     ^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_out_relative_pose_arr`

Check warning on line 207 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `out_fov_arr`

warning: unused variable: `out_fov_arr`
   --> alvr/server/src/c_api.rs:207:5
    |
207 |     out_fov_arr: *mut AlvrFov,            // 2 elements
    |     ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_out_fov_arr`

Check warning on line 206 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `out_head_relation`

warning: unused variable: `out_head_relation`
   --> alvr/server/src/c_api.rs:206:5
    |
206 |     out_head_relation: *mut AlvrSpaceRelation,
    |     ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_out_head_relation`

Check warning on line 200 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `value`

warning: unused variable: `value`
   --> alvr/server/src/c_api.rs:200:58
    |
200 | pub unsafe extern "C" fn alvr_set_output(output_id: u64, value: *const AlvrOutput) {
    |                                                          ^^^^^ help: if this is intentional, prefix it with an underscore: `_value`

Check warning on line 200 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `output_id`

warning: unused variable: `output_id`
   --> alvr/server/src/c_api.rs:200:42
    |
200 | pub unsafe extern "C" fn alvr_set_output(output_id: u64, value: *const AlvrOutput) {
    |                                          ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_output_id`

Check warning on line 193 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `out_joint_set`

warning: unused variable: `out_joint_set`
   --> alvr/server/src/c_api.rs:193:5
    |
193 |     out_joint_set: *mut AlvrJointSet,
    |     ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_out_joint_set`

Check warning on line 192 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `timestamp_ns`

warning: unused variable: `timestamp_ns`
   --> alvr/server/src/c_api.rs:192:5
    |
192 |     timestamp_ns: u64,
    |     ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_timestamp_ns`

Check warning on line 191 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `device_id`

warning: unused variable: `device_id`
   --> alvr/server/src/c_api.rs:191:5
    |
191 |     device_id: u64,
    |     ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_device_id`

Check warning on line 184 in alvr/server/src/c_api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `out_relation`

warning: unused variable: `out_relation`
   --> alvr/server/src/c_api.rs:184:5
    |
184 |     out_relation: *mut AlvrSpaceRelation,
    |     ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_out_relation`