ci: temporarily disable rowan tests #638
Annotations
139 warnings
consider adding a `;` to the last statement for consistent formatting:
cmds/jrsonnet/src/main.rs#L156
warning: consider adding a `;` to the last statement for consistent formatting
--> cmds/jrsonnet/src/main.rs:156:4
|
156 | eprintln!("{out}")
| ^^^^^^^^^^^^^^^^^^ help: add a `;` here: `eprintln!("{out}");`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::semicolon_if_nothing_returned)]`
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-cli/src/lib.rs#L105
warning: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-cli/src/lib.rs:105:3
|
105 | eprintln!("Tracked: {}", jrsonnet_gcmodule::count_thread_tracked())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `eprintln!("Tracked: {}", jrsonnet_gcmodule::count_thread_tracked());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
redundant closure:
crates/jrsonnet-cli/src/lib.rs#L91
warning: redundant closure
--> crates/jrsonnet-cli/src/lib.rs:91:28
|
91 | with_thread_object_space(|s| s.leak())
| ^^^^^^^^^^^^ help: replace the closure with the method itself: `jrsonnet_gcmodule::ObjectSpace::leak`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
= note: `-W clippy::redundant-closure-for-method-calls` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_closure_for_method_calls)]`
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-cli/src/lib.rs#L91
warning: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-cli/src/lib.rs:91:3
|
91 | with_thread_object_space(|s| s.leak())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `with_thread_object_space(|s| s.leak());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::semicolon_if_nothing_returned)]`
|
it is more concise to loop over references to containers instead of using explicit iteration methods:
crates/jrsonnet-cli/src/stdlib.rs#L121
warning: it is more concise to loop over references to containers instead of using explicit iteration methods
--> crates/jrsonnet-cli/src/stdlib.rs:121:14
|
121 | for ext in self.ext_code_file.iter() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&self.ext_code_file`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
|
it is more concise to loop over references to containers instead of using explicit iteration methods:
crates/jrsonnet-cli/src/stdlib.rs#L118
warning: it is more concise to loop over references to containers instead of using explicit iteration methods
--> crates/jrsonnet-cli/src/stdlib.rs:118:14
|
118 | for ext in self.ext_code.iter() {
| ^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&self.ext_code`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
|
it is more concise to loop over references to containers instead of using explicit iteration methods:
crates/jrsonnet-cli/src/stdlib.rs#L115
warning: it is more concise to loop over references to containers instead of using explicit iteration methods
--> crates/jrsonnet-cli/src/stdlib.rs:115:14
|
115 | for ext in self.ext_str_file.iter() {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&self.ext_str_file`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
|
it is more concise to loop over references to containers instead of using explicit iteration methods:
crates/jrsonnet-cli/src/stdlib.rs#L112
warning: it is more concise to loop over references to containers instead of using explicit iteration methods
--> crates/jrsonnet-cli/src/stdlib.rs:112:14
|
112 | for ext in self.ext_str.iter() {
| ^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&self.ext_str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
= note: `-W clippy::explicit-iter-loop` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::explicit_iter_loop)]`
|
unnecessary structure name repetition:
crates/jrsonnet-cli/src/stdlib.rs#L46
warning: unnecessary structure name repetition
--> crates/jrsonnet-cli/src/stdlib.rs:46:15
|
46 | None => Ok(ExtStr {
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-cli/src/stdlib.rs#L42
warning: unnecessary structure name repetition
--> crates/jrsonnet-cli/src/stdlib.rs:42:20
|
42 | Some(idx) => Ok(ExtStr {
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
= note: `-W clippy::use-self` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::use_self)]`
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-stdlib/src/lib.rs#L419
warning: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-stdlib/src/lib.rs:419:3
|
419 | self.settings_mut().context_initializer = tb!(initializer)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `self.settings_mut().context_initializer = tb!(initializer);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
used binding `_s` which is prefixed with an underscore. A leading underscore signals that a binding will not be used:
crates/jrsonnet-stdlib/src/lib.rs#L326
warning: used binding `_s` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
--> crates/jrsonnet-stdlib/src/lib.rs:326:53
|
326 | let mut context = ContextBuilder::with_capacity(_s, 1);
| ^^
|
note: `_s` is defined here
--> crates/jrsonnet-stdlib/src/lib.rs:312:13
|
312 | pub fn new(_s: State, resolver: PathResolver) -> Self {
| ^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
= note: `-W clippy::used-underscore-binding` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::used_underscore_binding)]`
|
calling `HashMap::default()` is more clear than this expression:
crates/jrsonnet-stdlib/src/lib.rs#L315
warning: calling `HashMap::default()` is more clear than this expression
--> crates/jrsonnet-stdlib/src/lib.rs:315:17
|
315 | ext_natives: Default::default(),
| ^^^^^^^^^^^^^^^^^^ help: try: `HashMap::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
|
calling `HashMap::default()` is more clear than this expression:
crates/jrsonnet-stdlib/src/lib.rs#L314
warning: calling `HashMap::default()` is more clear than this expression
--> crates/jrsonnet-stdlib/src/lib.rs:314:14
|
314 | ext_vars: Default::default(),
| ^^^^^^^^^^^^^^^^^^ help: try: `HashMap::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
= note: `-W clippy::default-trait-access` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::default_trait_access)]`
|
use Option::map_or_else instead of an if let/else:
crates/jrsonnet-stdlib/src/lib.rs#L271
warning: use Option::map_or_else instead of an if let/else
--> crates/jrsonnet-stdlib/src/lib.rs:271:5
|
271 | / match loc.0.source_path().path() {
272 | | Some(p) => self.resolver.resolve(p),
273 | | None => loc.0.source_path().to_string(),
274 | | },
| |_________________^ help: try: `loc.0.source_path().path().map_or_else(|| loc.0.source_path().to_string(), |p| self.resolver.resolve(p))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
|
used `cloned` where `copied` could be used instead:
crates/jrsonnet-stdlib/src/lib.rs#L199
warning: used `cloned` where `copied` could be used instead
--> crates/jrsonnet-stdlib/src/lib.rs:199:3
|
199 | .cloned()
| ^^^^^^ help: try: `copied`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied
= note: `-W clippy::cloned-instead-of-copied` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::cloned_instead_of_copied)]`
|
this function has too many lines (176/100):
crates/jrsonnet-stdlib/src/lib.rs#L51
warning: this function has too many lines (176/100)
--> crates/jrsonnet-stdlib/src/lib.rs:51:1
|
51 | / pub fn stdlib_uncached(settings: Rc<RefCell<Settings>>) -> ObjValue {
52 | | let mut builder = ObjValueBuilder::new();
53 | |
54 | | let expr = expr::stdlib_expr();
... |
249 | | builder.build()
250 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
= note: `-W clippy::too-many-lines` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::too_many_lines)]`
|
use Option::map_or_else instead of an if let/else:
crates/jrsonnet-stdlib/src/misc.rs#L70
warning: use Option::map_or_else instead of an if let/else
--> crates/jrsonnet-stdlib/src/misc.rs:70:2
|
70 | / if let Some(rest) = rest {
71 | | rest.evaluate()
72 | | } else {
73 | | Ok(str)
74 | | }
| |_____^ help: try: `rest.map_or_else(|| Ok(str), |rest| rest.evaluate())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
|
casting `u32` to `f64` may become silently lossy if you later change the type:
crates/jrsonnet-stdlib/src/strings.rs#L151
warning: casting `u32` to `f64` may become silently lossy if you later change the type
--> crates/jrsonnet-stdlib/src/strings.rs:151:26
|
151 | Ok(base * aggregate + digit as f64)
| ^^^^^^^^^^^^ help: try: `f64::from(digit)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
|
multiply and add expressions can be calculated more efficiently and accurately:
crates/jrsonnet-stdlib/src/strings.rs#L151
warning: multiply and add expressions can be calculated more efficiently and accurately
--> crates/jrsonnet-stdlib/src/strings.rs:151:7
|
151 | Ok(base * aggregate + digit as f64)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `base.mul_add(aggregate, digit as f64)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suboptimal_flops
= note: `-W clippy::suboptimal-flops` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::suboptimal_flops)]`
|
use Option::map_or_else instead of an if let/else:
crates/jrsonnet-stdlib/src/strings.rs#L142
warning: use Option::map_or_else instead of an if let/else
--> crates/jrsonnet-stdlib/src/strings.rs:142:15
|
142 | let digit = if let Some(digit) = checked_sub_if(BASE > 10, digit, LOWER_A_CODE) {
| _____________________^
143 | | digit + 10
144 | | } else if let Some(digit) = checked_sub_if(BASE > 10, digit, UPPER_A_CODE) {
145 | | digit + 10
146 | | } else {
147 | | digit.checked_sub(ZERO_CODE).unwrap_or(BASE)
148 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
help: try
|
142 ~ let digit = checked_sub_if(BASE > 10, digit, LOWER_A_CODE).map_or_else(|| if let Some(digit) = checked_sub_if(BASE > 10, digit, UPPER_A_CODE) {
143 ~ digit + 10
144 ~ } else {
145 ~ digit.checked_sub(ZERO_CODE).unwrap_or(BASE)
146 ~ }, |digit| digit + 10);
|
|
casting `u32` to `f64` may become silently lossy if you later change the type:
crates/jrsonnet-stdlib/src/strings.rs#L138
warning: casting `u32` to `f64` may become silently lossy if you later change the type
--> crates/jrsonnet-stdlib/src/strings.rs:138:13
|
138 | let base = BASE as f64;
| ^^^^^^^^^^^ help: try: `f64::from(BASE)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: `-W clippy::cast-lossless` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_lossless)]`
|
adding items after statements is confusing, since items exist from the start of the scope:
crates/jrsonnet-stdlib/src/strings.rs#L130
warning: adding items after statements is confusing, since items exist from the start of the scope
--> crates/jrsonnet-stdlib/src/strings.rs:130:2
|
130 | / fn checked_sub_if(condition: bool, lhs: u32, rhs: u32) -> Option<u32> {
131 | | if condition {
132 | | lhs.checked_sub(rhs)
133 | | } else {
134 | | None
135 | | }
136 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
|
adding items after statements is confusing, since items exist from the start of the scope:
crates/jrsonnet-stdlib/src/strings.rs#L127
warning: adding items after statements is confusing, since items exist from the start of the scope
--> crates/jrsonnet-stdlib/src/strings.rs:127:2
|
127 | const LOWER_A_CODE: u32 = 'a' as u32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
|
adding items after statements is confusing, since items exist from the start of the scope:
crates/jrsonnet-stdlib/src/strings.rs#L126
warning: adding items after statements is confusing, since items exist from the start of the scope
--> crates/jrsonnet-stdlib/src/strings.rs:126:2
|
126 | const UPPER_A_CODE: u32 = 'A' as u32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
|
adding items after statements is confusing, since items exist from the start of the scope:
crates/jrsonnet-stdlib/src/strings.rs#L125
warning: adding items after statements is confusing, since items exist from the start of the scope
--> crates/jrsonnet-stdlib/src/strings.rs:125:2
|
125 | const ZERO_CODE: u32 = '0' as u32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
= note: `-W clippy::items-after-statements` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::items_after_statements)]`
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-stdlib/src/strings.rs#L78
warning: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-stdlib/src/strings.rs:78:4
|
78 | out.push(Val::Num(ch_idx as f64))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `out.push(Val::Num(ch_idx as f64));`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
unnecessary boolean `not` operation:
crates/jrsonnet-stdlib/src/manifest/toml.rs#L183
warning: unnecessary boolean `not` operation
--> crates/jrsonnet-stdlib/src/manifest/toml.rs:183:3
|
183 | / if !is_section(&value)? {
184 | | if !first {
185 | | buf.push('\n');
186 | | }
... |
193 | | sections.push((key, value));
194 | | }
| |_________^
|
= help: remove the `!` 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
|
unnecessary `!=` operation:
crates/jrsonnet-stdlib/src/manifest/toml.rs#L115
warning: unnecessary `!=` operation
--> crates/jrsonnet-stdlib/src/manifest/toml.rs:115:5
|
115 | / if i != 0 {
116 | | buf.push(',');
117 | | } else {
118 | | buf.push('[');
119 | | }
| |_________________^
|
= 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: `-W clippy::if-not-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::if_not_else)]`
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-stdlib/src/objects.rs#L158
warning: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-stdlib/src/objects.rs:158:3
|
158 | new_obj.field(k).value(v.unwrap())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `new_obj.field(k).value(v.unwrap());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
it is more concise to loop over references to containers instead of using explicit iteration methods:
crates/jrsonnet-stdlib/src/sort.rs#L39
warning: it is more concise to loop over references to containers instead of using explicit iteration methods
--> crates/jrsonnet-stdlib/src/sort.rs:39:11
|
39 | for i in values.iter() {
| ^^^^^^^^^^^^^ help: to write this more concisely, try: `values`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
= note: `-W clippy::explicit-iter-loop` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::explicit_iter_loop)]`
|
strict comparison of `f32` or `f64`:
crates/jrsonnet-stdlib/src/math.rs#L145
warning: strict comparison of `f32` or `f64`
--> crates/jrsonnet-stdlib/src/math.rs:145:2
|
145 | builtin_round(x) != x
| ^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(builtin_round(x) - x).abs() > error_margin`
|
= note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp
|
strict comparison of `f32` or `f64`:
crates/jrsonnet-stdlib/src/math.rs#L140
warning: strict comparison of `f32` or `f64`
--> crates/jrsonnet-stdlib/src/math.rs:140:2
|
140 | builtin_round(x) == x
| ^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(builtin_round(x) - x).abs() < error_margin`
|
= note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp
|
strict comparison of `f32` or `f64`:
crates/jrsonnet-stdlib/src/math.rs#L135
warning: strict comparison of `f32` or `f64`
--> crates/jrsonnet-stdlib/src/math.rs:135:2
|
135 | builtin_round(x) % 2.0 == 1.0
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(builtin_round(x) % 2.0 - 1.0).abs() < error_margin`
|
= note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp
= note: `-W clippy::float-cmp` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::float_cmp)]`
|
use of `unwrap_or` followed by a function call:
crates/jrsonnet-stdlib/src/arrays.rs#L273
warning: use of `unwrap_or` followed by a function call
--> crates/jrsonnet-stdlib/src/arrays.rs:273:15
|
273 | newArrRight.unwrap_or(ArrValue::empty()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(ArrValue::empty)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
|
use of `unwrap_or` followed by a function call:
crates/jrsonnet-stdlib/src/arrays.rs#L272
warning: use of `unwrap_or` followed by a function call
--> crates/jrsonnet-stdlib/src/arrays.rs:272:14
|
272 | newArrLeft.unwrap_or(ArrValue::empty()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(ArrValue::empty)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
= note: `-W clippy::or-fun-call` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::or_fun_call)]`
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-stdlib/src/arrays.rs#L183
warning: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-stdlib/src/arrays.rs:183:6
|
183 | write!(out, "{item}").unwrap()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `write!(out, "{item}").unwrap();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-stdlib/src/arrays.rs#L28
warning: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-stdlib/src/arrays.rs:28:4
|
28 | out.push(trivial.clone())
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `out.push(trivial.clone());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::semicolon_if_nothing_returned)]`
|
use Option::map_or_else instead of an if let/else:
crates/jrsonnet-stdlib/src/arrays.rs#L25
warning: use Option::map_or_else instead of an if let/else
--> crates/jrsonnet-stdlib/src/arrays.rs:25:2
|
25 | / if let Some(trivial) = func.evaluate_trivial() {
26 | | let mut out = Vec::with_capacity(*sz as usize);
27 | | for _ in 0..*sz {
28 | | out.push(trivial.clone())
... |
32 | | Ok(ArrValue::range_exclusive(0, *sz).map(func))
33 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
= note: `-W clippy::option-if-let-else` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::option_if_let_else)]`
help: try
|
25 ~ func.evaluate_trivial().map_or_else(|| Ok(ArrValue::range_exclusive(0, *sz).map(func)), |trivial| {
26 ~ let mut out = Vec::with_capacity(*sz as usize);
27 ~ for _ in 0..*sz {
28 ~ out.push(trivial.clone())
29 ~ }
30 ~ Ok(ArrValue::eager(out))
31 ~ })
|
|
pub(crate) function inside private module:
crates/jrsonnet-stdlib/src/arrays.rs#L12
warning: pub(crate) function inside private module
--> crates/jrsonnet-stdlib/src/arrays.rs:12:1
|
12 | pub(crate) fn eval_on_empty(on_empty: Option<Thunk<Val>>) -> Result<Val> {
| ----------^^^^^^^^^^^^^^^^^
| |
| help: consider using: `pub`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
= note: `-W clippy::redundant-pub-crate` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::redundant_pub_crate)]`
|
redundant else block:
crates/jrsonnet-stdlib/src/misc.rs#L112
warning: redundant else block
--> crates/jrsonnet-stdlib/src/misc.rs:112:11
|
112 | } else {
| ____________________^
113 | | let a_len = a.len();
114 | | for (a, b) in a.iter().skip(a_len - b.len()).zip(b.iter()) {
115 | | let a = a?;
... |
121 | | true
122 | | }
| |_____________^
|
= help: remove the `else` block and move the contents out
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else
|
redundant else block:
crates/jrsonnet-stdlib/src/misc.rs#L87
warning: redundant else block
--> crates/jrsonnet-stdlib/src/misc.rs:87:11
|
87 | } else {
| ____________________^
88 | | for (a, b) in a.iter().take(b.len()).zip(b.iter()) {
89 | | let a = a?;
90 | | let b = b?;
... |
95 | | true
96 | | }
| |_____________^
|
= help: remove the `else` block and move the contents out
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else
= note: `-W clippy::redundant-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_else)]`
|
usage of wildcard import:
crates/jrsonnet-evaluator/src/lib.rs#L48
warning: usage of wildcard import
--> crates/jrsonnet-evaluator/src/lib.rs:48:5
|
48 | use jrsonnet_parser::*;
| ^^^^^^^^^^^^^^^^^^ help: try: `jrsonnet_parser::{ExprLocation, LocExpr, ParserSettings, Source, SourcePath, SourcePathT}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L526
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:526:4
|
526 | Val::Arr(arr) => IndexableVal::Arr(arr),
| ^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L525
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:525:4
|
525 | Val::Str(s) => IndexableVal::Str(s.into_flat()),
| ^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L371
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:371:4
|
371 | StrValue::Tree(t) => {
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L370
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:370:4
|
370 | StrValue::Flat(v) => write!(f, "{v}"),
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L348
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:348:4
|
348 | StrValue::Tree(t) => t.2,
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L347
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:347:4
|
347 | StrValue::Flat(v) => v.len(),
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L338
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:338:4
|
338 | StrValue::Tree(_) => {
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L337
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:337:4
|
337 | StrValue::Flat(f) => f,
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L310
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:310:32
|
310 | pub fn concat(a: StrValue, b: StrValue) -> Self {
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L310
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:310:19
|
310 | pub fn concat(a: StrValue, b: StrValue) -> Self {
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L280
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:280:4
|
280 | IndexableVal::Arr(arr) => {
| ^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L242
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:242:4
|
242 | IndexableVal::Str(s) => {
| ^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L225
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:225:4
|
225 | IndexableVal::Arr(arr) => arr,
| ^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L224
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:224:4
|
224 | IndexableVal::Str(s) => ArrValue::chars(s.chars()),
| ^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/val.rs#L150
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/val.rs:150:3
|
150 | Thunk::new(value)
| ^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/typed/conversions.rs#L627
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/typed/conversions.rs:627:4
|
627 | IndexableVal::Arr(a) => Ok(Val::Arr(a)),
| ^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/typed/conversions.rs#L626
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/typed/conversions.rs:626:4
|
626 | IndexableVal::Str(s) => Ok(Val::string(s)),
| ^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/typed/conversions.rs#L384
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/typed/conversions.rs:384:17
|
384 | let mut out = BTreeMap::new();
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/typed/conversions.rs#L361
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/typed/conversions.rs:361:22
|
361 | .collect::<Result<Vec<T>>>()
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/stack.rs#L27
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/stack.rs:27:3
|
27 | ErrorKind::StackOverflow
| ^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/obj.rs#L425
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/obj.rs:425:37
|
425 | fn run_assertions_raw(&self, this: ObjValue) -> Result<()> {
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/obj.rs#L413
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/obj.rs:413:37
|
413 | fn get_raw(&self, key: IStr, this: ObjValue) -> Result<Option<Val>> {
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/obj.rs#L401
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/obj.rs:401:41
|
401 | pub fn get_for(&self, key: IStr, this: ObjValue) -> Result<Option<Val>> {
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/obj.rs#L281
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/obj.rs:281:17
|
281 | ObjValue::new(ThisOverride {
| ^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
usage of wildcard import:
crates/jrsonnet-evaluator/src/obj.rs#L91
warning: usage of wildcard import
--> crates/jrsonnet-evaluator/src/obj.rs:91:5
|
91 | use ordering::*;
| ^^^^^^^^^^^ help: try: `ordering::{FieldIndex, FieldSortKey, SuperDepth}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
= note: `-W clippy::wildcard-imports` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::wildcard_imports)]`
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L610
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:610:49
|
610 | pub fn from_serde(v: impl Serialize) -> Result<Val, JrError> {
| ^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L546
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:546:3
|
546 | T: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `T: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L533
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:533:3
|
533 | T: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `T: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L509
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:509:3
|
509 | T: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `T: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L416
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:416:3
|
416 | T: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `T: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L399
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:399:3
|
399 | T: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `T: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L373
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:373:3
|
373 | V: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `V: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L372
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:372:3
|
372 | K: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `K: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L361
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:361:3
|
361 | T: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `T: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L351
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:351:3
|
351 | T: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `T: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L307
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:307:3
|
307 | T: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `T: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L292
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:292:3
|
292 | T: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `T: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L277
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:277:3
|
277 | T: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `T: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
|
this type has already been used as a bound predicate:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L253
warning: this type has already been used as a bound predicate
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:253:3
|
253 | T: Serialize,
| ^^^^^^^^^^^^
|
= help: consider combining the bounds: `T: ?Sized + Serialize`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
= note: `-W clippy::type-repetition-in-bounds` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::type_repetition_in_bounds)]`
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L218
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:218:4
|
218 | Val::Func(_) => Err(S::Error::custom("tried to manifest function")),
| ^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L193
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:193:4
|
193 | Val::Obj(obj) => {
| ^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L171
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:171:4
|
171 | Val::Arr(arr) => {
| ^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L161
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:161:4
|
161 | Val::Num(n) => {
| ^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L160
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:160:4
|
160 | Val::Str(s) => serializer.serialize_str(&s.clone().into_flat()),
| ^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L159
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:159:4
|
159 | Val::Null => serializer.serialize_none(),
| ^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L158
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:158:4
|
158 | Val::Bool(v) => serializer.serialize_bool(*v),
| ^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/integrations/serde.rs#L18
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/integrations/serde.rs:18:47
|
18 | fn deserialize<D>(deserializer: D) -> Result<Val, D::Error>
| ^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/function/mod.rs#L240
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/function/mod.rs:240:4
|
240 | FuncVal::Normal(n) => n.evaluate_trivial(),
| ^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/function/arglike.rs#L74
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/function/arglike.rs:74:4
|
74 | TlaArg::Lazy(lazy) => Ok(lazy.clone()),
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/function/arglike.rs#L73
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/function/arglike.rs:73:4
|
73 | TlaArg::Val(val) => Ok(Thunk::evaluated(val.clone())),
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/function/arglike.rs#L65
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/function/arglike.rs:65:4
|
65 | TlaArg::Code(code) => Ok(if tailstrict {
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/function/arglike.rs#L64
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/function/arglike.rs:64:4
|
64 | TlaArg::String(s) => Ok(Thunk::evaluated(Val::string(s.clone()))),
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/arr/mod.rs#L73
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/arr/mod.rs:73:34
|
73 | pub fn extended(a: ArrValue, b: ArrValue) -> Self {
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/arr/mod.rs#L73
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/arr/mod.rs:73:21
|
73 | pub fn extended(a: ArrValue, b: ArrValue) -> Self {
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-evaluator/src/arr/mod.rs#L45
warning: unnecessary structure name repetition
--> crates/jrsonnet-evaluator/src/arr/mod.rs:45:24
|
45 | pub fn repeated(data: ArrValue, repeats: usize) -> Option<Self> {
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
= note: `-W clippy::use-self` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::use_self)]`
|
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 | |
4 | | // For jrsonnet-macros
... |
10 | | mod ctx;
11 | | mod dynamic;
| |_
|
::: 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: `-W clippy::redundant-pub-crate` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::redundant_pub_crate)]`
|
unknown lint: `clippy::unconditional_recursion`:
crates/jrsonnet-evaluator/src/val.rs#L380
warning: unknown lint: `clippy::unconditional_recursion`
--> crates/jrsonnet-evaluator/src/val.rs:380:10
|
380 | #[allow(clippy::unconditional_recursion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `unconditional_recursion`
|
= note: `#[warn(unknown_lints)]` on by default
|
item in documentation is missing backticks:
crates/jrsonnet-macros/src/lib.rs#L770
warning: item in documentation is missing backticks
--> crates/jrsonnet-macros/src/lib.rs:770:5
|
770 | /// IStr formatting helper
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
= note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]`
help: try
|
770 | /// `IStr` formatting helper
| ~~~~~~
|
used `flat_map` where `filter_map` could be used instead:
crates/jrsonnet-macros/src/lib.rs#L626
warning: used `flat_map` where `filter_map` could be used instead
--> crates/jrsonnet-macros/src/lib.rs:626:5
|
626 | .flat_map(TypedField::expand_field)
| ^^^^^^^^ help: try: `filter_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#flat_map_option
|
use Option::map_or_else instead of an if let/else:
crates/jrsonnet-macros/src/lib.rs#L557
warning: use Option::map_or_else instead of an if let/else
--> crates/jrsonnet-macros/src/lib.rs:557:6
|
557 | Ok(if let Some(name) = self.name() {
| ____________^
558 | | let hide = if self.attr.hide {
559 | | quote! {.hide()}
560 | | } else {
... |
594 | | }
595 | | })
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
help: try
|
557 ~ Ok(self.name().map_or_else(|| if self.is_option {
558 ~ quote! {
559 ~ if let Some(value) = self.#ident {
560 ~ <#ty as TypedObj>::serialize(value, out)?;
561 ~ }
562 ~ }
563 ~ } else {
564 ~ quote! {
565 ~ <#ty as TypedObj>::serialize(self.#ident, out)?;
566 ~ }
567 ~ }, |name| {
568 ~ let hide = if self.attr.hide {
569 ~ quote! {.hide()}
570 ~ } else {
571 ~ quote! {}
572 ~ };
573 ~ let add = if self.attr.add {
574 ~ quote! {.add()}
575 ~ } else {
576 ~ quote! {}
577 ~ };
578 ~ if self.is_option {
579 ~ quote! {
580 ~ if let Some(value) = self.#ident {
581 ~ out.field(#name)
582 ~ #hide
583 ~ #add
584 ~ .try_value(<#ty as Typed>::into_untyped(value)?)?;
585 ~ }
586 ~ }
587 ~ } else {
588 ~ quote! {
589 ~ out.field(#name)
590 ~ #hide
591 ~ #add
592 ~ .try_value(<#ty as Typed>::into_untyped(self.#ident)?)?;
593 ~ }
594 ~ }
595 ~ }))
|
|
this function's return value is unnecessarily wrapped by `Result`:
crates/jrsonnet-macros/src/lib.rs#L554
warning: this function's return value is unnecessarily wrapped by `Result`
--> crates/jrsonnet-macros/src/lib.rs:554:2
|
554 | / fn expand_serialize(&self) -> Result<TokenStream> {
555 | | let ident = &self.ident;
556 | | let ty = &self.ty;
557 | | Ok(if let Some(name) = self.name() {
... |
595 | | })
596 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
= note: `-W clippy::unnecessary-wraps` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::unnecessary_wraps)]`
help: remove `Result` from the return type...
|
554 | fn expand_serialize(&self) -> proc_macro2::TokenStream {
| ~~~~~~~~~~~~~~~~~~~~~~~~
help: ...and then change returning expressions
|
557 ~ if let Some(name) = self.name() {
558 ~ let hide = if self.attr.hide {
559 ~ quote! {.hide()}
560 ~ } else {
561 ~ quote! {}
562 ~ };
563 ~ let add = if self.attr.add {
564 ~ quote! {.add()}
565 ~ } else {
566 ~ quote! {}
567 ~ };
568 ~ if self.is_option {
569 ~ quote! {
570 ~ if let Some(value) = self.#ident {
571 ~ out.field(#name)
572 ~ #hide
573 ~ #add
574 ~ .try_value(<#ty as Typed>::into_untyped(value)?)?;
575 ~ }
576 ~ }
577 ~ } else {
578 ~ quote! {
579 ~ out.field(#name)
580 ~ #hide
581 ~ #add
582 ~ .try_value(<#ty as Typed>::into_untyped(self.#ident)?)?;
583 ~ }
584 ~ }
585 ~ } else if self.is_option {
586 ~ quote! {
587 ~ if let Some(value) = self.#ident {
588 ~ <#ty as TypedObj>::serialize(value, out)?;
589 ~ }
590 ~ }
591 ~ } else {
592 ~ quote! {
593 ~ <#ty as TypedObj>::serialize(self.#ident, out)?;
594 ~ }
595 ~ }
|
|
use Option::map_or_else instead of an if let/else:
crates/jrsonnet-macros/src/lib.rs#L470
warning: use Option::map_or_else instead of an if let/else
--> crates/jrsonnet-macros/src/lib.rs:470:25
|
470 | let (is_option, ty) = if let Some(ty) = extract_type_from_option(&field.ty)? {
| _______________________________^
471 | | (true, ty.clone())
472 | | } else {
473 | | (false, field.ty.clone())
474 | | };
| |_________^ help: try: `(extract_type_from_option(&field.ty)?).map_or_else(|| (false, field.ty.clone()), |ty| (true, ty.clone()))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
= note: `-W clippy::option-if-let-else` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::option_if_let_else)]`
|
more than 3 bools in a struct:
crates/jrsonnet-macros/src/lib.rs#L393
warning: more than 3 bools in a struct
--> crates/jrsonnet-macros/src/lib.rs:393:1
|
393 | / struct TypedAttr {
394 | | rename: Option<String>,
395 | | flatten: bool,
396 | | /// flatten(ok) strategy for flattened optionals
... |
402 | | hide: bool,
403 | | }
| |_^
|
= help: consider using a state machine or refactoring bools into two-variant enums
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_excessive_bools
= note: `-W clippy::struct-excessive-bools` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::struct_excessive_bools)]`
|
redundant closure:
crates/jrsonnet-macros/src/lib.rs#L278
warning: redundant closure
--> crates/jrsonnet-macros/src/lib.rs:278:34
|
278 | let name = name.as_ref().map(|v| v.as_str()).unwrap_or("<unnamed>");
| ^^^^^^^^^^^^^^ help: replace the closure with the method itself: `std::string::String::as_str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
= note: `-W clippy::redundant-closure-for-method-calls` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::redundant_closure_for_method_calls)]`
|
called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead:
crates/jrsonnet-macros/src/lib.rs#L278
warning: called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead
--> crates/jrsonnet-macros/src/lib.rs:278:16
|
278 | let name = name.as_ref().map(|v| v.as_str()).unwrap_or("<unnamed>");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
help: use `map_or(<a>, <f>)` instead
|
278 - let name = name.as_ref().map(|v| v.as_str()).unwrap_or("<unnamed>");
278 + let name = name.as_ref().map_or("<unnamed>", |v| v.as_str());
|
|
called `map(<f>).unwrap_or_else(<g>)` on an `Option` value. This can be done more directly by calling `map_or_else(<g>, <f>)` instead:
crates/jrsonnet-macros/src/lib.rs#L245
warning: called `map(<f>).unwrap_or_else(<g>)` on an `Option` value. This can be done more directly by calling `map_or_else(<g>, <f>)` instead
--> crates/jrsonnet-macros/src/lib.rs:245:15
|
245 | let name = name
| ________________________^
246 | | .as_ref()
247 | | .map(|n| quote! {ParamName::new_static(#n)})
248 | | .unwrap_or_else(|| quote! {None});
| |_________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
help: try
|
245 ~ let name = name
246 ~ .as_ref().map_or_else(|| quote! {None}, |n| quote! {ParamName::new_static(#n)});
|
|
called `map(<f>).unwrap_or_else(<g>)` on an `Option` value. This can be done more directly by calling `map_or_else(<g>, <f>)` instead:
crates/jrsonnet-macros/src/lib.rs#L235
warning: called `map(<f>).unwrap_or_else(<g>)` on an `Option` value. This can be done more directly by calling `map_or_else(<g>, <f>)` instead
--> crates/jrsonnet-macros/src/lib.rs:235:15
|
235 | let name = name
| ________________________^
236 | | .as_ref()
237 | | .map(|n| quote! {ParamName::new_static(#n)})
238 | | .unwrap_or_else(|| quote! {None});
| |_________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
= note: `-W clippy::map-unwrap-or` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::map_unwrap_or)]`
help: try
|
235 ~ let name = name
236 ~ .as_ref().map_or_else(|| quote! {None}, |n| quote! {ParamName::new_static(#n)});
|
|
this match arm has an identical body to another arm:
crates/jrsonnet-macros/src/lib.rs#L254
warning: this match arm has an identical body to another arm
--> crates/jrsonnet-macros/src/lib.rs:254:3
|
254 | ArgInfo::Location => None,
| -----------------^^^^^^^^
| |
| help: try merging the arm patterns: `ArgInfo::Location | ArgInfo::This`
|
= help: or try changing either arm body
note: other arm here
--> crates/jrsonnet-macros/src/lib.rs:255:3
|
255 | ArgInfo::This => None,
| ^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
crates/jrsonnet-macros/src/lib.rs#L253
warning: this match arm has an identical body to another arm
--> crates/jrsonnet-macros/src/lib.rs:253:3
|
253 | ArgInfo::Context => None,
| ----------------^^^^^^^^
| |
| help: try merging the arm patterns: `ArgInfo::Context | ArgInfo::This`
|
= help: or try changing either arm body
note: other arm here
--> crates/jrsonnet-macros/src/lib.rs:255:3
|
255 | ArgInfo::This => None,
| ^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
crates/jrsonnet-macros/src/lib.rs#L253
warning: this match arm has an identical body to another arm
--> crates/jrsonnet-macros/src/lib.rs:253:3
|
253 | ArgInfo::Context => None,
| ----------------^^^^^^^^
| |
| help: try merging the arm patterns: `ArgInfo::Context | ArgInfo::Location`
|
= help: or try changing either arm body
note: other arm here
--> crates/jrsonnet-macros/src/lib.rs:254:3
|
254 | ArgInfo::Location => None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
= note: `-W clippy::match-same-arms` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::match_same_arms)]`
|
used `flat_map` where `filter_map` could be used instead:
crates/jrsonnet-macros/src/lib.rs#L228
warning: used `flat_map` where `filter_map` could be used instead
--> crates/jrsonnet-macros/src/lib.rs:228:32
|
228 | let params_desc = args.iter().flat_map(|a| match a {
| ^^^^^^^^ help: try: `filter_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#flat_map_option
= note: `-W clippy::flat-map-option` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::flat_map_option)]`
|
this function has too many lines (168/100):
crates/jrsonnet-macros/src/lib.rs#L208
warning: this function has too many lines (168/100)
--> crates/jrsonnet-macros/src/lib.rs:208:1
|
208 | / fn builtin_inner(
209 | | attr: BuiltinAttrs,
210 | | fun: ItemFn,
211 | | item: proc_macro2::TokenStream,
... |
389 | | })
390 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
= note: `-W clippy::too-many-lines` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::too_many_lines)]`
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L211
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:211:4
|
211 | ComplexValType::Lazy(lazy) => write!(f, "Lazy<{lazy}>")?,
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L210
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:210:4
|
210 | ComplexValType::SumRef(v) => write_union(f, false, v.iter().copied())?,
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L209
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:209:4
|
209 | ComplexValType::Sum(v) => write_union(f, false, v.iter())?,
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L208
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:208:4
|
208 | ComplexValType::UnionRef(v) => write_union(f, true, v.iter().copied())?,
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L207
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:207:4
|
207 | ComplexValType::Union(v) => write_union(f, true, v.iter())?,
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L201
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:201:20
|
201 | if matches!(a, ComplexValType::Any) {
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L200
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:200:4
|
200 | ComplexValType::AttrsOf(a) => {
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L190
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:190:4
|
190 | ComplexValType::ObjectRef(fields) => {
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L189
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:189:4
|
189 | ComplexValType::Array(a) => print_array(a, f)?,
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L188
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:188:4
|
188 | ComplexValType::ArrayRef(a) => print_array(a, f)?,
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
empty String is being created manually:
crates/jrsonnet-types/src/lib.rs#L186
warning: empty String is being created manually
--> crates/jrsonnet-types/src/lib.rs:186:48
|
186 | b.map(|e| e.to_string()).unwrap_or_else(|| "".into())
| ^^^^^^^^^ help: consider using: `String::new()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new
|
empty String is being created manually:
crates/jrsonnet-types/src/lib.rs#L185
warning: empty String is being created manually
--> crates/jrsonnet-types/src/lib.rs:185:48
|
185 | a.map(|e| e.to_string()).unwrap_or_else(|| "".into()),
| ^^^^^^^^^ help: consider using: `String::new()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new
= note: `-W clippy::manual-string-new` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_string_new)]`
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L182
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:182:4
|
182 | ComplexValType::BoundedNumber(a, b) => write!(
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L181
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:181:4
|
181 | ComplexValType::Char => write!(f, "char")?,
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L180
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:180:4
|
180 | ComplexValType::Simple(s) => write!(f, "{s}")?,
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
crates/jrsonnet-types/src/lib.rs#L179
warning: unnecessary structure name repetition
--> crates/jrsonnet-types/src/lib.rs:179:4
|
179 | ComplexValType::Any => write!(f, "any")?,
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
= note: `-W clippy::use-self` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::use_self)]`
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-types/src/lib.rs#L171
warning: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-types/src/lib.rs:171:3
|
171 | write!(f, "Array<{a}>")?
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `write!(f, "Array<{a}>")?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
consider adding a `;` to the last statement for consistent formatting:
crates/jrsonnet-types/src/lib.rs#L169
warning: consider adding a `;` to the last statement for consistent formatting
--> crates/jrsonnet-types/src/lib.rs:169:3
|
169 | write!(f, "array")?
| ^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `write!(f, "array")?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::semicolon_if_nothing_returned)]`
|
clippy_check
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
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/
|