Make LEDs state setable one by one #4
Annotations
49 warnings
variables can be used directly in the `format!` string:
src/main.rs#L237
warning: variables can be used directly in the `format!` string
--> src/main.rs:237:36
|
237 | .map_err(|err| CustomError(format!("can't release the writable USB endpoint: {}", err)))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
237 - .map_err(|err| CustomError(format!("can't release the writable USB endpoint: {}", err)))?;
237 + .map_err(|err| CustomError(format!("can't release the writable USB endpoint: {err}")))?;
|
|
variables can be used directly in the `format!` string:
src/main.rs#L225
warning: variables can be used directly in the `format!` string
--> src/main.rs:225:25
|
225 | CustomError(format!("can't write the Warthog throttle configuration: {}", err))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
225 - CustomError(format!("can't write the Warthog throttle configuration: {}", err))
225 + CustomError(format!("can't write the Warthog throttle configuration: {err}"))
|
|
variables can be used directly in the `format!` string:
src/main.rs#L217
warning: variables can be used directly in the `format!` string
--> src/main.rs:217:5
|
217 | println!("Setting the Warthog throttle LEDs to {} and the intensity to {}...", leds, intensity);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
217 - println!("Setting the Warthog throttle LEDs to {} and the intensity to {}...", leds, intensity);
217 + println!("Setting the Warthog throttle LEDs to {leds} and the intensity to {intensity}...");
|
|
variables can be used directly in the `format!` string:
src/main.rs#L215
warning: variables can be used directly in the `format!` string
--> src/main.rs:215:36
|
215 | .map_err(|err| CustomError(format!("can't configure readable endpoint: {}", err)))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
215 - .map_err(|err| CustomError(format!("can't configure readable endpoint: {}", err)))?;
215 + .map_err(|err| CustomError(format!("can't configure readable endpoint: {err}")))?;
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/main.rs#L214
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/main.rs:214:42
|
214 | usb::configure_endpoint(&mut handle, &writable_endpoint)
| ^^^^^^^^^^^^^^^^^^ help: change this to: `writable_endpoint`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
variables can be used directly in the `format!` string:
src/main.rs#L152
warning: variables can be used directly in the `format!` string
--> src/main.rs:152:36
|
152 | .map_err(|err| CustomError(format!("can't release the readable USB endpoint: {}", err)))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
152 - .map_err(|err| CustomError(format!("can't release the readable USB endpoint: {}", err)))?;
152 + .map_err(|err| CustomError(format!("can't release the readable USB endpoint: {err}")))?;
|
|
variables can be used directly in the `format!` string:
src/main.rs#L148
warning: variables can be used directly in the `format!` string
--> src/main.rs:148:5
|
148 | println!("Intensity: {}", current_intensity);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
148 - println!("Intensity: {}", current_intensity);
148 + println!("Intensity: {current_intensity}");
|
|
variables can be used directly in the `format!` string:
src/main.rs#L147
warning: variables can be used directly in the `format!` string
--> src/main.rs:147:5
|
147 | println!("LEDs: {}", current_leds);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
147 - println!("LEDs: {}", current_leds);
147 + println!("LEDs: {current_leds}");
|
|
variables can be used directly in the `format!` string:
src/main.rs#L143
warning: variables can be used directly in the `format!` string
--> src/main.rs:143:25
|
143 | CustomError(format!("can't read the Warthog throttle configuration: {}", err))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
143 - CustomError(format!("can't read the Warthog throttle configuration: {}", err))
143 + CustomError(format!("can't read the Warthog throttle configuration: {err}"))
|
|
variables can be used directly in the `format!` string:
src/main.rs#L136
warning: variables can be used directly in the `format!` string
--> src/main.rs:136:36
|
136 | .map_err(|err| CustomError(format!("can't configure readable endpoint: {}", err)))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
136 - .map_err(|err| CustomError(format!("can't configure readable endpoint: {}", err)))?;
136 + .map_err(|err| CustomError(format!("can't configure readable endpoint: {err}")))?;
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/main.rs#L135
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/main.rs:135:42
|
135 | usb::configure_endpoint(&mut handle, &readable_endpoint)
| ^^^^^^^^^^^^^^^^^^ help: change this to: `readable_endpoint`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
variables can be used directly in the `format!` string:
src/main.rs#L110
warning: variables can be used directly in the `format!` string
--> src/main.rs:110:36
|
110 | .map_err(|err| CustomError(format!("can't find USB endpoints: {}", err)))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
110 - .map_err(|err| CustomError(format!("can't find USB endpoints: {}", err)))?;
110 + .map_err(|err| CustomError(format!("can't find USB endpoints: {err}")))?;
|
|
variables can be used directly in the `format!` string:
src/main.rs#L105
warning: variables can be used directly in the `format!` string
--> src/main.rs:105:40
|
105 | .map_err(|err| CustomError(format!("can't print the device info: {}", err)))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
105 - .map_err(|err| CustomError(format!("can't print the device info: {}", err)))?;
105 + .map_err(|err| CustomError(format!("can't print the device info: {err}")))?;
|
|
variables can be used directly in the `format!` string:
src/main.rs#L87
warning: variables can be used directly in the `format!` string
--> src/main.rs:87:36
|
87 | .map_err(|err| CustomError(format!("can't create a USB context: {}", err)))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
87 - .map_err(|err| CustomError(format!("can't create a USB context: {}", err)))?;
87 + .map_err(|err| CustomError(format!("can't create a USB context: {err}")))?;
|
|
this function has too many lines (115/100):
src/main.rs#L83
warning: this function has too many lines (115/100)
--> src/main.rs:83:1
|
83 | / fn main() -> Result<(), CustomError> {
84 | | let matches = command_line_args().get_matches();
85 | |
86 | | let mut context = Context::new()
... |
241 | | Ok(())
242 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
= note: `#[warn(clippy::too_many_lines)]` implied by `#[warn(clippy::pedantic)]`
|
variables can be used directly in the `format!` string:
src/usb.rs#L141
warning: variables can be used directly in the `format!` string
--> src/usb.rs:141:9
|
141 | println!("{:02X?}", data);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
141 - println!("{:02X?}", data);
141 + println!("{data:02X?}");
|
|
variables can be used directly in the `format!` string:
src/usb.rs#L93
warning: variables can be used directly in the `format!` string
--> src/usb.rs:93:25
|
93 | println!("{:#?}", endpoint_desc);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
93 - println!("{:#?}", endpoint_desc);
93 + println!("{endpoint_desc:#?}");
|
|
variables can be used directly in the `format!` string:
src/usb.rs#L88
warning: variables can be used directly in the `format!` string
--> src/usb.rs:88:21
|
88 | println!("{:#?}", interface_desc);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
88 - println!("{:#?}", interface_desc);
88 + println!("{interface_desc:#?}");
|
|
variables can be used directly in the `format!` string:
src/usb.rs#L82
warning: variables can be used directly in the `format!` string
--> src/usb.rs:82:13
|
82 | println!("{:#?}", config_desc);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
82 - println!("{:#?}", config_desc);
82 + println!("{config_desc:#?}");
|
|
this could be rewritten as `let...else`:
src/usb.rs#L76
warning: this could be rewritten as `let...else`
--> src/usb.rs:76:9
|
76 | / let config_desc = match device.config_descriptor(n) {
77 | | Ok(c) => c,
78 | | Err(_) => continue,
79 | | };
| |__________^ help: consider writing: `let Ok(config_desc) = device.config_descriptor(n) else { continue };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
|
variables can be used directly in the `format!` string:
src/usb.rs#L43
warning: variables can be used directly in the `format!` string
--> src/usb.rs:43:9
|
43 | println!("Language: {:?}", language);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]`
help: change this to
|
43 - println!("Language: {:?}", language);
43 + println!("Language: {language:?}");
|
|
this could be rewritten as `let...else`:
src/usb.rs#L18
warning: this could be rewritten as `let...else`
--> src/usb.rs:18:9
|
18 | / let device_desc = match device.device_descriptor() {
19 | | Ok(d) => d,
20 | | Err(_) => continue,
21 | | };
| |__________^ help: consider writing: `let Ok(device_desc) = device.device_descriptor() else { continue };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
|
this could be rewritten as `let...else`:
src/usb.rs#L12
warning: this could be rewritten as `let...else`
--> src/usb.rs:12:5
|
12 | / let devices = match context.devices() {
13 | | Ok(d) => d,
14 | | Err(_) => return None,
15 | | };
| |______^ help: consider writing: `let Ok(devices) = context.devices() else { return None };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![warn(clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::manual_let_else)]` implied by `#[warn(clippy::pedantic)]`
|
Lint
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-unknown-linux-gnu)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions/[email protected]. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Build (x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-apple-darwin)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions/[email protected]. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Build (x86_64-apple-darwin)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-apple-darwin)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-apple-darwin)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-apple-darwin)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-apple-darwin)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-apple-darwin)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-pc-windows-msvc)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions/[email protected]. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Build (x86_64-pc-windows-msvc)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-pc-windows-msvc)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-pc-windows-msvc)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-pc-windows-msvc)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-pc-windows-msvc)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Build (x86_64-pc-windows-msvc)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
warthog-config-x86_64-apple-darwin-5ce681d
Expired
|
1.14 MB |
|
warthog-config-x86_64-pc-windows-msvc-5ce681d
Expired
|
1.39 MB |
|
warthog-config-x86_64-unknown-linux-gnu-5ce681d
Expired
|
1.44 MB |
|