ci: use actions-rust-lang/setup-rust-toolchain
#581
Annotations
41 errors and 1 warning
matching over `()` is more explicit:
crates/jrsonnet-evaluator/src/typed/mod.rs#L93
error: matching over `()` is more explicit
--> crates/jrsonnet-evaluator/src/typed/mod.rs:93:6
|
93 | Ok(_) => Ok(()),
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
crates/jrsonnet-evaluator/src/typed/conversions.rs#L436
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> crates/jrsonnet-evaluator/src/typed/conversions.rs:436:3
|
436 | / match &value {
437 | | Val::Arr(a) => {
438 | | if let Some(bytes) = a.as_any().downcast_ref::<BytesArray>() {
439 | | return Ok(bytes.0.as_slice().into());
... |
453 | | }
454 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else
= note: `-D clippy::single-match-else` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::single_match_else)]`
help: try
|
436 ~ if let Val::Arr(a) = &value {
437 ~ if let Some(bytes) = a.as_any().downcast_ref::<BytesArray>() {
438 ~ return Ok(bytes.0.as_slice().into());
439 ~ };
440 ~ <Self as Typed>::TYPE.check(&value)?;
441 ~ // Any::downcast_ref::<ByteArray>(&a);
442 ~ let mut out = Vec::with_capacity(a.len());
443 ~ for e in a.iter() {
444 ~ let r = e?;
445 ~ out.push(u8::from_untyped(r)?);
446 ~ }
447 ~ Ok(out.as_slice().into())
448 ~ } else {
449 ~ <Self as Typed>::TYPE.check(&value)?;
450 ~ unreachable!()
451 ~ }
|
|
matching over `()` is more explicit:
crates/jrsonnet-evaluator/src/stdlib/format.rs#L251
error: matching over `()` is more explicit
--> crates/jrsonnet-evaluator/src/stdlib/format.rs:251:7
|
251 | let (_, str) = try_parse_length_modifier(str)?;
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
|
redundant clone:
crates/jrsonnet-evaluator/src/obj.rs#L637
error: redundant clone
--> crates/jrsonnet-evaluator/src/obj.rs:637:31
|
637 | let entry = out.entry(name.clone());
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> crates/jrsonnet-evaluator/src/obj.rs:637:27
|
637 | let entry = out.entry(name.clone());
| ^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
|
redundant clone:
crates/jrsonnet-evaluator/src/obj.rs#L498
error: redundant clone
--> crates/jrsonnet-evaluator/src/obj.rs:498:31
|
498 | let entry = out.entry(name.clone());
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> crates/jrsonnet-evaluator/src/obj.rs:498:27
|
498 | let entry = out.entry(name.clone());
| ^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
|
question mark operator is useless here:
crates/jrsonnet-evaluator/src/obj.rs#L477
error: question mark operator is useless here
--> crates/jrsonnet-evaluator/src/obj.rs:477:5
|
477 | Ok(self.obj.get_or_bail(self.key)?)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `self.obj.get_or_bail(self.key)`
|
= 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)]`
|
use of `unwrap_or` followed by a function call:
crates/jrsonnet-evaluator/src/obj.rs#L398
error: use of `unwrap_or` followed by a function call
--> crates/jrsonnet-evaluator/src/obj.rs:398:35
|
398 | self.get_for(key, self.0.this().unwrap_or(self.clone()))
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| self.clone())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
= note: `-D clippy::or-fun-call` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::or_fun_call)]`
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-evaluator/src/obj.rs#L350
error: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-evaluator/src/obj.rs:350:4
|
350 | member = member.add()
| ^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `member = member.add();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `-D clippy::semicolon-if-nothing-returned` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::semicolon_if_nothing_returned)]`
|
manual `Debug` impl does not include all fields:
crates/jrsonnet-evaluator/src/obj.rs#L166
error: manual `Debug` impl does not include all fields
--> crates/jrsonnet-evaluator/src/obj.rs:166:1
|
166 | / impl Debug for OopObject {
167 | | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
168 | | f.debug_struct("OopObject")
169 | | .field("sup", &self.sup)
... |
175 | | }
176 | | }
| |_^
|
note: this field is unused
--> crates/jrsonnet-evaluator/src/obj.rs:161:2
|
161 | assertions: Cc<Vec<TraceBox<dyn ObjectAssertion>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: this field is unused
--> crates/jrsonnet-evaluator/src/obj.rs:162:2
|
162 | assertions_ran: RefCell<GcHashSet<ObjValue>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: this field is unused
--> crates/jrsonnet-evaluator/src/obj.rs:164:2
|
164 | value_cache: RefCell<GcHashMap<(IStr, Option<WeakObjValue>), CacheValue>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: consider including all fields in this `Debug` impl
= help: consider calling `.finish_non_exhaustive()` if you intend to ignore fields
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_fields_in_debug
= note: `-D clippy::missing-fields-in-debug` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::missing_fields_in_debug)]`
|
this function has too many lines (118/100):
crates/jrsonnet-evaluator/src/manifest.rs#L178
error: this function has too many lines (118/100)
--> crates/jrsonnet-evaluator/src/manifest.rs:178:1
|
178 | / fn manifest_json_ex_buf(
179 | | val: &Val,
180 | | buf: &mut String,
181 | | cur_padding: &mut String,
... |
305 | | Ok(())
306 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
= note: `-D clippy::too-many-lines` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::too_many_lines)]`
|
unnecessary `!=` operation:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L162
error: unnecessary `!=` operation
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:162:5
|
162 | / if n.fract() != 0.0 {
163 | | serializer.serialize_f64(*n)
164 | | } else {
165 | | let n = *n as i64;
166 | | serializer.serialize_i64(n)
167 | | }
| |_________________^
|
= help: change to `==` and swap the blocks of the `if`/`else`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
= note: `-D clippy::if-not-else` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::if_not_else)]`
|
redundant clone:
crates/jrsonnet-evaluator/src/function/builtin.rs#L90
error: redundant clone
--> crates/jrsonnet-evaluator/src/function/builtin.rs:90:36
|
90 | name: ParamName::new_dynamic(n.to_string()),
| ^^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> crates/jrsonnet-evaluator/src/function/builtin.rs:90:35
|
90 | name: ParamName::new_dynamic(n.to_string()),
| ^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `-D clippy::redundant-clone` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_clone)]`
|
use Option::map_or instead of an if let/else:
crates/jrsonnet-evaluator/src/function/builtin.rs#L30
error: use Option::map_or instead of an if let/else
--> crates/jrsonnet-evaluator/src/function/builtin.rs:30:3
|
30 | / match &self.0 {
31 | | Some(s) => s.as_bytes() == other.as_bytes(),
32 | | None => false,
33 | | }
| |_________^ help: try: `self.0.as_ref().map_or(false, |s| s.as_bytes() == other.as_bytes())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
= note: `-D clippy::option-if-let-else` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::option_if_let_else)]`
|
item in documentation is missing backticks:
crates/jrsonnet-evaluator/src/function/builtin.rs#L9
error: item in documentation is missing backticks
--> crates/jrsonnet-evaluator/src/function/builtin.rs:9:45
|
9 | /// Can't have str | IStr, because constant BuiltinParam causes
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
9 | /// Can't have str | IStr, because constant `BuiltinParam` causes
| ~~~~~~~~~~~~~~
|
item in documentation is missing backticks:
crates/jrsonnet-evaluator/src/function/builtin.rs#L9
error: item in documentation is missing backticks
--> crates/jrsonnet-evaluator/src/function/builtin.rs:9:22
|
9 | /// Can't have str | IStr, because constant BuiltinParam causes
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
= note: `-D clippy::doc-markdown` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::doc_markdown)]`
help: try
|
9 | /// Can't have str | `IStr`, because constant BuiltinParam causes
| ~~~~~~
|
accessing first element with `specs.get(0)`:
crates/jrsonnet-evaluator/src/evaluate/mod.rs#L92
error: accessing first element with `specs.get(0)`
--> crates/jrsonnet-evaluator/src/evaluate/mod.rs:92:8
|
92 | match specs.get(0) {
| ^^^^^^^^^^^^ help: try: `specs.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `-D clippy::get-first` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::get_first)]`
|
pub(crate) import inside private module:
crates/jrsonnet-evaluator/src/lib.rs#L1
error: pub(crate) import inside private module
--> crates/jrsonnet-evaluator/src/lib.rs:1:1
|
1 | / //! jsonnet interpreter implementation
2 | | #![cfg_attr(feature = "nightly", feature(thread_local, type_alias_impl_trait))]
3 | | #![deny(unsafe_op_in_unsafe_fn)]
4 | | #![warn(
... |
10 | | explicit_outlives_requirements,
11 | | noop_method_call,
| |_
|
::: crates/jrsonnet-evaluator/src/arr/mod.rs:11:1
|
11 | pub(crate) use spec::*;
| ---------- help: consider using: `pub`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
= note: `-D clippy::redundant-pub-crate` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_pub_crate)]`
|
matching over `()` is more explicit:
crates/jrsonnet-evaluator/src/arr/spec.rs#L511
error: matching over `()` is more explicit
--> crates/jrsonnet-evaluator/src/arr/spec.rs:511:24
|
511 | ArrayThunk::Waiting(_) | ArrayThunk::Pending => {}
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
|
matching over `()` is more explicit:
crates/jrsonnet-evaluator/src/arr/spec.rs#L464
error: matching over `()` is more explicit
--> crates/jrsonnet-evaluator/src/arr/spec.rs:464:27
|
464 | let ArrayThunk::Waiting(_) =
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
= note: `-D clippy::ignored-unit-patterns` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::ignored_unit_patterns)]`
|
this bound is already specified as the supertrait of `ExactSizeIterator`:
crates/jrsonnet-evaluator/src/arr/spec.rs#L375
error: this bound is already specified as the supertrait of `ExactSizeIterator`
--> crates/jrsonnet-evaluator/src/arr/spec.rs:375:26
|
375 | fn range(&self) -> impl Iterator<Item = i32> + ExactSizeIterator + DoubleEndedIterator {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
= note: `-D clippy::implied-bounds-in-impls` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::implied_bounds_in_impls)]`
help: try removing this bound
|
375 - fn range(&self) -> impl Iterator<Item = i32> + ExactSizeIterator + DoubleEndedIterator {
375 + fn range(&self) -> impl ExactSizeIterator<Item = i32> + DoubleEndedIterator {
|
|
clippy_check
Clippy had exited with the 101 exit code
|
matching over `()` is more explicit:
crates/jrsonnet-evaluator/src/typed/mod.rs#L93
error: matching over `()` is more explicit
--> crates/jrsonnet-evaluator/src/typed/mod.rs:93:6
|
93 | Ok(_) => Ok(()),
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
crates/jrsonnet-evaluator/src/typed/conversions.rs#L436
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> crates/jrsonnet-evaluator/src/typed/conversions.rs:436:3
|
436 | / match &value {
437 | | Val::Arr(a) => {
438 | | if let Some(bytes) = a.as_any().downcast_ref::<BytesArray>() {
439 | | return Ok(bytes.0.as_slice().into());
... |
453 | | }
454 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else
= note: `-D clippy::single-match-else` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::single_match_else)]`
help: try
|
436 ~ if let Val::Arr(a) = &value {
437 ~ if let Some(bytes) = a.as_any().downcast_ref::<BytesArray>() {
438 ~ return Ok(bytes.0.as_slice().into());
439 ~ };
440 ~ <Self as Typed>::TYPE.check(&value)?;
441 ~ // Any::downcast_ref::<ByteArray>(&a);
442 ~ let mut out = Vec::with_capacity(a.len());
443 ~ for e in a.iter() {
444 ~ let r = e?;
445 ~ out.push(u8::from_untyped(r)?);
446 ~ }
447 ~ Ok(out.as_slice().into())
448 ~ } else {
449 ~ <Self as Typed>::TYPE.check(&value)?;
450 ~ unreachable!()
451 ~ }
|
|
matching over `()` is more explicit:
crates/jrsonnet-evaluator/src/stdlib/format.rs#L251
error: matching over `()` is more explicit
--> crates/jrsonnet-evaluator/src/stdlib/format.rs:251:7
|
251 | let (_, str) = try_parse_length_modifier(str)?;
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
|
redundant clone:
crates/jrsonnet-evaluator/src/obj.rs#L637
error: redundant clone
--> crates/jrsonnet-evaluator/src/obj.rs:637:31
|
637 | let entry = out.entry(name.clone());
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> crates/jrsonnet-evaluator/src/obj.rs:637:27
|
637 | let entry = out.entry(name.clone());
| ^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
|
redundant clone:
crates/jrsonnet-evaluator/src/obj.rs#L498
error: redundant clone
--> crates/jrsonnet-evaluator/src/obj.rs:498:31
|
498 | let entry = out.entry(name.clone());
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> crates/jrsonnet-evaluator/src/obj.rs:498:27
|
498 | let entry = out.entry(name.clone());
| ^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
|
question mark operator is useless here:
crates/jrsonnet-evaluator/src/obj.rs#L477
error: question mark operator is useless here
--> crates/jrsonnet-evaluator/src/obj.rs:477:5
|
477 | Ok(self.obj.get_or_bail(self.key)?)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `self.obj.get_or_bail(self.key)`
|
= 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)]`
|
use of `unwrap_or` followed by a function call:
crates/jrsonnet-evaluator/src/obj.rs#L398
error: use of `unwrap_or` followed by a function call
--> crates/jrsonnet-evaluator/src/obj.rs:398:35
|
398 | self.get_for(key, self.0.this().unwrap_or(self.clone()))
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| self.clone())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
= note: `-D clippy::or-fun-call` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::or_fun_call)]`
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-evaluator/src/obj.rs#L350
error: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-evaluator/src/obj.rs:350:4
|
350 | member = member.add()
| ^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `member = member.add();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `-D clippy::semicolon-if-nothing-returned` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::semicolon_if_nothing_returned)]`
|
manual `Debug` impl does not include all fields:
crates/jrsonnet-evaluator/src/obj.rs#L166
error: manual `Debug` impl does not include all fields
--> crates/jrsonnet-evaluator/src/obj.rs:166:1
|
166 | / impl Debug for OopObject {
167 | | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
168 | | f.debug_struct("OopObject")
169 | | .field("sup", &self.sup)
... |
175 | | }
176 | | }
| |_^
|
note: this field is unused
--> crates/jrsonnet-evaluator/src/obj.rs:161:2
|
161 | assertions: Cc<Vec<TraceBox<dyn ObjectAssertion>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: this field is unused
--> crates/jrsonnet-evaluator/src/obj.rs:162:2
|
162 | assertions_ran: RefCell<GcHashSet<ObjValue>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: this field is unused
--> crates/jrsonnet-evaluator/src/obj.rs:164:2
|
164 | value_cache: RefCell<GcHashMap<(IStr, Option<WeakObjValue>), CacheValue>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: consider including all fields in this `Debug` impl
= help: consider calling `.finish_non_exhaustive()` if you intend to ignore fields
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_fields_in_debug
= note: `-D clippy::missing-fields-in-debug` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::missing_fields_in_debug)]`
|
this function has too many lines (118/100):
crates/jrsonnet-evaluator/src/manifest.rs#L178
error: this function has too many lines (118/100)
--> crates/jrsonnet-evaluator/src/manifest.rs:178:1
|
178 | / fn manifest_json_ex_buf(
179 | | val: &Val,
180 | | buf: &mut String,
181 | | cur_padding: &mut String,
... |
305 | | Ok(())
306 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
= note: `-D clippy::too-many-lines` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::too_many_lines)]`
|
unnecessary `!=` operation:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L162
error: unnecessary `!=` operation
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:162:5
|
162 | / if n.fract() != 0.0 {
163 | | serializer.serialize_f64(*n)
164 | | } else {
165 | | let n = *n as i64;
166 | | serializer.serialize_i64(n)
167 | | }
| |_________________^
|
= help: change to `==` and swap the blocks of the `if`/`else`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
= note: `-D clippy::if-not-else` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::if_not_else)]`
|
redundant clone:
crates/jrsonnet-evaluator/src/function/builtin.rs#L90
error: redundant clone
--> crates/jrsonnet-evaluator/src/function/builtin.rs:90:36
|
90 | name: ParamName::new_dynamic(n.to_string()),
| ^^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> crates/jrsonnet-evaluator/src/function/builtin.rs:90:35
|
90 | name: ParamName::new_dynamic(n.to_string()),
| ^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `-D clippy::redundant-clone` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_clone)]`
|
use Option::map_or instead of an if let/else:
crates/jrsonnet-evaluator/src/function/builtin.rs#L30
error: use Option::map_or instead of an if let/else
--> crates/jrsonnet-evaluator/src/function/builtin.rs:30:3
|
30 | / match &self.0 {
31 | | Some(s) => s.as_bytes() == other.as_bytes(),
32 | | None => false,
33 | | }
| |_________^ help: try: `self.0.as_ref().map_or(false, |s| s.as_bytes() == other.as_bytes())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
= note: `-D clippy::option-if-let-else` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::option_if_let_else)]`
|
item in documentation is missing backticks:
crates/jrsonnet-evaluator/src/function/builtin.rs#L9
error: item in documentation is missing backticks
--> crates/jrsonnet-evaluator/src/function/builtin.rs:9:45
|
9 | /// Can't have str | IStr, because constant BuiltinParam causes
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
9 | /// Can't have str | IStr, because constant `BuiltinParam` causes
| ~~~~~~~~~~~~~~
|
item in documentation is missing backticks:
crates/jrsonnet-evaluator/src/function/builtin.rs#L9
error: item in documentation is missing backticks
--> crates/jrsonnet-evaluator/src/function/builtin.rs:9:22
|
9 | /// Can't have str | IStr, because constant BuiltinParam causes
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
= note: `-D clippy::doc-markdown` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::doc_markdown)]`
help: try
|
9 | /// Can't have str | `IStr`, because constant BuiltinParam causes
| ~~~~~~
|
accessing first element with `specs.get(0)`:
crates/jrsonnet-evaluator/src/evaluate/mod.rs#L92
error: accessing first element with `specs.get(0)`
--> crates/jrsonnet-evaluator/src/evaluate/mod.rs:92:8
|
92 | match specs.get(0) {
| ^^^^^^^^^^^^ help: try: `specs.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `-D clippy::get-first` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::get_first)]`
|
pub(crate) import inside private module:
crates/jrsonnet-evaluator/src/lib.rs#L1
error: pub(crate) import inside private module
--> crates/jrsonnet-evaluator/src/lib.rs:1:1
|
1 | / //! jsonnet interpreter implementation
2 | | #![cfg_attr(feature = "nightly", feature(thread_local, type_alias_impl_trait))]
3 | | #![deny(unsafe_op_in_unsafe_fn)]
4 | | #![warn(
... |
10 | | explicit_outlives_requirements,
11 | | noop_method_call,
| |_
|
::: crates/jrsonnet-evaluator/src/arr/mod.rs:11:1
|
11 | pub(crate) use spec::*;
| ---------- help: consider using: `pub`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
= note: `-D clippy::redundant-pub-crate` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_pub_crate)]`
|
matching over `()` is more explicit:
crates/jrsonnet-evaluator/src/arr/spec.rs#L511
error: matching over `()` is more explicit
--> crates/jrsonnet-evaluator/src/arr/spec.rs:511:24
|
511 | ArrayThunk::Waiting(_) | ArrayThunk::Pending => {}
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
|
matching over `()` is more explicit:
crates/jrsonnet-evaluator/src/arr/spec.rs#L464
error: matching over `()` is more explicit
--> crates/jrsonnet-evaluator/src/arr/spec.rs:464:27
|
464 | let ArrayThunk::Waiting(_) =
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
= note: `-D clippy::ignored-unit-patterns` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::ignored_unit_patterns)]`
|
this bound is already specified as the supertrait of `ExactSizeIterator`:
crates/jrsonnet-evaluator/src/arr/spec.rs#L375
error: this bound is already specified as the supertrait of `ExactSizeIterator`
--> crates/jrsonnet-evaluator/src/arr/spec.rs:375:26
|
375 | fn range(&self) -> impl Iterator<Item = i32> + ExactSizeIterator + DoubleEndedIterator {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
= note: `-D clippy::implied-bounds-in-impls` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::implied_bounds_in_impls)]`
help: try removing this bound
|
375 - fn range(&self) -> impl Iterator<Item = i32> + ExactSizeIterator + DoubleEndedIterator {
375 + fn range(&self) -> impl ExactSizeIterator<Item = i32> + DoubleEndedIterator {
|
|
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/
|