feat: optional bigint preservation #538
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
25 warnings
unused variable: `ac`:
crates/jrsonnet-stdlib/src/sets.rs#L111
warning: unused variable: `ac`
--> crates/jrsonnet-stdlib/src/sets.rs:111:17
|
111 | while let Some(ac) = &ak {
| ^^ help: if this is intentional, prefix it with an underscore: `_ac`
|
= note: `#[warn(unused_variables)]` on by default
|
matching over `()` is more explicit:
crates/jrsonnet-evaluator/src/typed/mod.rs#L93
warning: 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#L437
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> crates/jrsonnet-evaluator/src/typed/conversions.rs:437:3
|
437 | / match &value {
438 | | Val::Arr(a) => {
439 | | if let Some(bytes) = a.as_any().downcast_ref::<BytesArray>() {
440 | | return Ok(bytes.0.as_slice().into());
... |
454 | | }
455 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else
= note: `#[warn(clippy::single_match_else)]` implied by `#[warn(clippy::pedantic)]`
help: try
|
437 ~ if let Val::Arr(a) = &value {
438 ~ if let Some(bytes) = a.as_any().downcast_ref::<BytesArray>() {
439 ~ return Ok(bytes.0.as_slice().into());
440 ~ };
441 ~ <Self as Typed>::TYPE.check(&value)?;
442 ~ // Any::downcast_ref::<ByteArray>(&a);
443 ~ let mut out = Vec::with_capacity(a.len());
444 ~ for e in a.iter() {
445 ~ let r = e?;
446 ~ out.push(u8::from_untyped(r)?);
447 ~ }
448 ~ Ok(out.as_slice().into())
449 ~ } else {
450 ~ <Self as Typed>::TYPE.check(&value)?;
451 ~ unreachable!()
452 ~ }
|
|
matching over `()` is more explicit:
crates/jrsonnet-evaluator/src/stdlib/format.rs#L251
warning: 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#L636
warning: redundant clone
--> crates/jrsonnet-evaluator/src/obj.rs:636:31
|
636 | let entry = out.entry(name.clone());
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> crates/jrsonnet-evaluator/src/obj.rs:636:27
|
636 | 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#L497
warning: redundant clone
--> crates/jrsonnet-evaluator/src/obj.rs:497:31
|
497 | let entry = out.entry(name.clone());
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> crates/jrsonnet-evaluator/src/obj.rs:497:27
|
497 | 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#L476
warning: question mark operator is useless here
--> crates/jrsonnet-evaluator/src/obj.rs:476:5
|
476 | 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: the lint level is defined here
--> crates/jrsonnet-evaluator/src/lib.rs:5:2
|
5 | clippy::all,
| ^^^^^^^^^^^
= note: `#[warn(clippy::needless_question_mark)]` implied by `#[warn(clippy::all)]`
|
use of `unwrap_or` followed by a function call:
crates/jrsonnet-evaluator/src/obj.rs#L397
warning: use of `unwrap_or` followed by a function call
--> crates/jrsonnet-evaluator/src/obj.rs:397:35
|
397 | 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: `#[warn(clippy::or_fun_call)]` implied by `#[warn(clippy::nursery)]`
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-evaluator/src/obj.rs#L349
warning: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-evaluator/src/obj.rs:349:4
|
349 | 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: `#[warn(clippy::semicolon_if_nothing_returned)]` implied by `#[warn(clippy::pedantic)]`
|
manual `Debug` impl does not include all fields:
crates/jrsonnet-evaluator/src/obj.rs#L165
warning: manual `Debug` impl does not include all fields
--> crates/jrsonnet-evaluator/src/obj.rs:165:1
|
165 | / impl Debug for OopObject {
166 | | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
167 | | f.debug_struct("OopObject")
168 | | .field("sup", &self.sup)
... |
174 | | }
175 | | }
| |_^
|
note: this field is unused
--> crates/jrsonnet-evaluator/src/obj.rs:160:2
|
160 | assertions: Cc<Vec<TraceBox<dyn ObjectAssertion>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: this field is unused
--> crates/jrsonnet-evaluator/src/obj.rs:161:2
|
161 | assertions_ran: RefCell<GcHashSet<ObjValue>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: this field is unused
--> crates/jrsonnet-evaluator/src/obj.rs:163:2
|
163 | 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: `#[warn(clippy::missing_fields_in_debug)]` implied by `#[warn(clippy::pedantic)]`
|
this function has too many lines (103/100):
crates/jrsonnet-evaluator/src/manifest.rs#L161
warning: this function has too many lines (103/100)
--> crates/jrsonnet-evaluator/src/manifest.rs:161:1
|
161 | / fn manifest_json_ex_buf(
162 | | val: &Val,
163 | | buf: &mut String,
164 | | cur_padding: &mut String,
... |
273 | | Ok(())
274 | | }
| |_^
|
= 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)]`
|
unnecessary `!=` operation:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L165
warning: unnecessary `!=` operation
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:165:5
|
165 | / if n.fract() != 0.0 {
166 | | serializer.serialize_f64(*n)
167 | | } else {
168 | | let n = *n as i64;
169 | | serializer.serialize_i64(n)
170 | | }
| |_________________^
|
= 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: `#[warn(clippy::if_not_else)]` implied by `#[warn(clippy::pedantic)]`
|
redundant clone:
crates/jrsonnet-evaluator/src/function/builtin.rs#L90
warning: 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
|
use Option::map_or instead of an if let/else:
crates/jrsonnet-evaluator/src/function/builtin.rs#L30
warning: 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: `#[warn(clippy::option_if_let_else)]` implied by `#[warn(clippy::nursery)]`
|
item in documentation is missing backticks:
crates/jrsonnet-evaluator/src/function/builtin.rs#L9
warning: 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
warning: 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: `#[warn(clippy::doc_markdown)]` implied by `#[warn(clippy::pedantic)]`
help: try
|
9 | /// Can't have str | `IStr`, because constant BuiltinParam causes
| ~~~~~~
|
redundant clone:
crates/jrsonnet-evaluator/src/evaluate/mod.rs#L505
warning: redundant clone
--> crates/jrsonnet-evaluator/src/evaluate/mod.rs:505:30
|
505 | ... throw!(NoSuchField(key.clone().into_flat(), suggestions))
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> crates/jrsonnet-evaluator/src/evaluate/mod.rs:505:27
|
505 | ... throw!(NoSuchField(key.clone().into_flat(), suggestions))
| ^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `#[warn(clippy::redundant_clone)]` implied by `#[warn(clippy::nursery)]`
|
pub(crate) import inside private module:
crates/jrsonnet-evaluator/src/lib.rs#L1
warning: 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: the lint level is defined here
--> crates/jrsonnet-evaluator/src/lib.rs:6:2
|
6 | clippy::nursery,
| ^^^^^^^^^^^^^^^
= note: `#[warn(clippy::redundant_pub_crate)]` implied by `#[warn(clippy::nursery)]`
|
matching over `()` is more explicit:
crates/jrsonnet-evaluator/src/arr/spec.rs#L517
warning: matching over `()` is more explicit
--> crates/jrsonnet-evaluator/src/arr/spec.rs:517:24
|
517 | 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#L470
warning: matching over `()` is more explicit
--> crates/jrsonnet-evaluator/src/arr/spec.rs:470:27
|
470 | 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: the lint level is defined here
--> crates/jrsonnet-evaluator/src/lib.rs:7:2
|
7 | clippy::pedantic,
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::ignored_unit_patterns)]` implied by `#[warn(clippy::pedantic)]`
|
clippy_check
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/
|
clippy_check
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/
|
clippy_check
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/
|
clippy_check
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/
|
clippy_check
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/
|