simplify tokio deps #509
rust.yml
on: push
build-test-win
7m 31s
build-test-msvc
0s
build-test-mac
2m 44s
build
9m 17s
test-and-valgrind
0s
Annotations
5 errors and 9 warnings
build-test-mac
Process completed with exit code 101.
|
if let can be simplified with `.unwrap_or_default()`:
src/quickjsruntimeadapter.rs#L216
error: if let can be simplified with `.unwrap_or_default()`
--> src/quickjsruntimeadapter.rs:216:13
|
216 | / if let Some(res) = q_js_rt.with_all_module_loaders(|module_loader| {
217 | | if module_loader.has_module(q_ctx, module_name.as_str()) {
218 | | match module_loader.init_module(q_ctx, module) {
219 | | Ok(_) => {
... |
238 | | 0
239 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: `-D clippy::manual-unwrap-or-default` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::manual_unwrap_or_default)]`
help: replace it with
|
216 ~ q_js_rt.with_all_module_loaders(|module_loader| {
217 + if module_loader.has_module(q_ctx, module_name.as_str()) {
218 + match module_loader.init_module(q_ctx, module) {
219 + Ok(_) => {
220 + Some(0) // ok
221 + }
222 + Err(e) => {
223 + q_ctx.report_ex(
224 + format!(
225 + "Failed to init native module: {module_name} caused by {e}"
226 + )
227 + .as_str(),
228 + );
229 + Some(1)
230 + }
231 + }
232 + } else {
233 + None
234 + }
235 + }).unwrap_or_default()
|
|
this pattern reimplements `Option::unwrap_or`:
src/quickjsruntimeadapter.rs#L216
error: this pattern reimplements `Option::unwrap_or`
--> src/quickjsruntimeadapter.rs:216:13
|
216 | / if let Some(res) = q_js_rt.with_all_module_loaders(|module_loader| {
217 | | if module_loader.has_module(q_ctx, module_name.as_str()) {
218 | | match module_loader.init_module(q_ctx, module) {
219 | | Ok(_) => {
... |
238 | | 0
239 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or
= note: `-D clippy::manual-unwrap-or` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::manual_unwrap_or)]`
help: replace with
|
216 ~ q_js_rt.with_all_module_loaders(|module_loader| {
217 + if module_loader.has_module(q_ctx, module_name.as_str()) {
218 + match module_loader.init_module(q_ctx, module) {
219 + Ok(_) => {
220 + Some(0) // ok
221 + }
222 + Err(e) => {
223 + q_ctx.report_ex(
224 + format!(
225 + "Failed to init native module: {module_name} caused by {e}"
226 + )
227 + .as_str(),
228 + );
229 + Some(1)
230 + }
231 + }
232 + } else {
233 + None
234 + }
235 + }).unwrap_or(0)
|
|
importing legacy numeric constants:
src/quickjsrealmadapter.rs#L29
error: importing legacy numeric constants
--> src/quickjsrealmadapter.rs:29:5
|
29 | use std::i32;
| ^^^^^^^^
|
= help: remove this import
= note: then `i32::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `-D clippy::legacy-numeric-constants` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::legacy_numeric_constants)]`
|
build
Clippy had exited with the 101 exit code
|
build-test-mac
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
build-test-win
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
build-test-win
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
build-test-win
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-test-win
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-test-win
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-test-win
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
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v2, 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/
|
build
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v2, actions/cache@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|