chore: resolve Clippy warnings #585
GitHub Actions / clippy
failed
Oct 29, 2023 in 0s
clippy
2 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 2 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.75.0-nightly (2f1bd0729 2023-10-27)
- cargo 1.75.0-nightly (df3509237 2023-10-24)
- clippy 0.1.75 (2f1bd07 2023-10-27)
Annotations
Check failure on line 50 in crates/jrsonnet-stdlib/src/misc.rs
github-actions / clippy
redundant closure
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)]`
Check failure on line 42 in crates/jrsonnet-stdlib/src/encoding.rs
github-actions / clippy
question mark operator is useless here
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)]`
Loading