Automate asio sys build (#804) #746
clippy
15 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 15 |
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 177 in src/host/jack/mod.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/host/jack/mod.rs:177:13
|
177 | return Err(format!("Failed to open client because of error: {:?}", e));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
177 - return Err(format!("Failed to open client because of error: {:?}", e));
177 + Err(format!("Failed to open client because of error: {:?}", e))
|
Check warning on line 174 in src/host/jack/mod.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/host/jack/mod.rs:174:13
|
174 | return Ok(client);
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
174 - return Ok(client);
174 + Ok(client)
|
Check warning on line 278 in src/host/jack/stream.rs
github-actions / clippy
returning the result of a `let` binding from a block
warning: returning the result of a `let` binding from a block
--> src/host/jack/stream.rs:278:5
|
277 | let data = unsafe { Data::from_parts(data, len, JACK_SAMPLE_FORMAT) };
| ---------------------------------------------------------------------- unnecessary `let` binding
278 | data
| ^^^^
|
= 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
|
277 ~
278 ~ unsafe { Data::from_parts(data, len, JACK_SAMPLE_FORMAT) }
|
Check warning on line 273 in src/host/jack/stream.rs
github-actions / clippy
writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
--> src/host/jack/stream.rs:273:43
|
273 | fn temp_buffer_to_data(temp_input_buffer: &mut Vec<f32>, total_buffer_size: usize) -> Data {
| ^^^^^^^^^^^^^ help: change this to: `&mut [f32]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
Check warning on line 252 in src/host/jack/stream.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> src/host/jack/stream.rs:241:5
|
241 | / fn new(
242 | | out_ports: Vec<jack::Port<jack::AudioOut>>,
243 | | in_ports: Vec<jack::Port<jack::AudioIn>>,
244 | | sample_rate: SampleRate,
... |
251 | | error_callback_ptr: ErrorCallbackPtr,
252 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
Check warning on line 249 in src/host/jack/stream.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/host/jack/stream.rs:247:31
|
247 | output_data_callback: Option<
| _______________________________^
248 | | Box<dyn FnMut(&mut Data, &OutputCallbackInfo) + Send + 'static>,
249 | | >,
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 246 in src/host/jack/stream.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/host/jack/stream.rs:246:30
|
246 | input_data_callback: Option<Box<dyn FnMut(&Data, &InputCallbackInfo) + Send + 'static>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 229 in src/host/jack/stream.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/host/jack/stream.rs:229:27
|
229 | output_data_callback: Option<Box<dyn FnMut(&mut Data, &OutputCallbackInfo) + Send + 'static>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 228 in src/host/jack/stream.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/host/jack/stream.rs:228:26
|
228 | input_data_callback: Option<Box<dyn FnMut(&Data, &InputCallbackInfo) + Send + 'static>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 warning on line 105 in src/host/jack/stream.rs
github-actions / clippy
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> src/host/jack/stream.rs:105:86
|
105 | let port_try = client.register_port(&format!("out_{}", i), jack::AudioOut::default());
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
Check warning on line 40 in src/host/jack/stream.rs
github-actions / clippy
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> src/host/jack/stream.rs:40:84
|
40 | let port_try = client.register_port(&format!("in_{}", i), jack::AudioIn::default());
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
= note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
Check warning on line 899 in src/host/alsa/mod.rs
github-actions / clippy
casting to the same type is unnecessary (`i64` -> `i64`)
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> src/host/alsa/mod.rs:899:40
|
899 | ts.tv_sec as i64 * 1_000_000_000 + ts.tv_nsec as i64
| ^^^^^^^^^^^^^^^^^ help: try: `ts.tv_nsec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 899 in src/host/alsa/mod.rs
github-actions / clippy
casting to the same type is unnecessary (`i64` -> `i64`)
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> src/host/alsa/mod.rs:899:5
|
899 | ts.tv_sec as i64 * 1_000_000_000 + ts.tv_nsec as i64
| ^^^^^^^^^^^^^^^^ help: try: `ts.tv_sec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 437 in src/host/alsa/mod.rs
github-actions / clippy
casting to the same type is unnecessary (`u32` -> `u32`)
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> src/host/alsa/mod.rs:437:53
|
437 | max_sample_rate: SampleRate(max_rate as u32),
| ^^^^^^^^^^^^^^^ help: try: `max_rate`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 436 in src/host/alsa/mod.rs
github-actions / clippy
casting to the same type is unnecessary (`u32` -> `u32`)
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> src/host/alsa/mod.rs:436:53
|
436 | min_sample_rate: SampleRate(min_rate as u32),
| ^^^^^^^^^^^^^^^ help: try: `min_rate`
|
= 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