Skip to content

chore: resolve Clippy warnings #585

chore: resolve Clippy warnings

chore: resolve Clippy warnings #585

Triggered via push October 29, 2023 18:53
Status Failure
Total duration 1m 10s
Artifacts

clippy_check.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 1 warning
redundant closure: crates/jrsonnet-stdlib/src/misc.rs#L50
error: redundant closure --> crates/jrsonnet-stdlib/src/misc.rs:50:22 | 50 | .map_or(Val::Null, |v| Val::Func(v)) | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Val::Func` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `-D clippy::redundant-closure` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
question mark operator is useless here: crates/jrsonnet-stdlib/src/encoding.rs#L42
error: question mark operator is useless here --> crates/jrsonnet-stdlib/src/encoding.rs:42:2 | 42 | Ok(String::from_utf8(bytes).map_err(|_| runtime_error!("bad utf8"))?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `String::from_utf8(bytes).map_err(|_| runtime_error!("bad utf8"))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark = note: `-D clippy::needless-question-mark` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_question_mark)]`
redundant closure: crates/jrsonnet-stdlib/src/misc.rs#L50
error: redundant closure --> crates/jrsonnet-stdlib/src/misc.rs:50:22 | 50 | .map_or(Val::Null, |v| Val::Func(v)) | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Val::Func` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `-D clippy::redundant-closure` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
question mark operator is useless here: crates/jrsonnet-stdlib/src/encoding.rs#L42
error: question mark operator is useless here --> crates/jrsonnet-stdlib/src/encoding.rs:42:2 | 42 | Ok(String::from_utf8(bytes).map_err(|_| runtime_error!("bad utf8"))?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `String::from_utf8(bytes).map_err(|_| runtime_error!("bad utf8"))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark = note: `-D clippy::needless-question-mark` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_question_mark)]`
clippy_check
Clippy had exited with the 101 exit code
clippy_check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@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/