clippy
23 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 23 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.75.0-nightly (2f1bd0729 2023-10-27)
- cargo 1.75.0-nightly (df3509237 2023-10-24)
- clippy 0.1.75 (2f1bd07 2023-10-27)
Annotations
Check warning on line 172 in crates/jrsonnet-stdlib/src/manifest/xml.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/jrsonnet-stdlib/src/manifest/xml.rs:172:15
|
172 | out.push_str(&remaining);
| ^^^^^^^^^^ help: change this to: `remaining`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 169 in crates/jrsonnet-stdlib/src/manifest/xml.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/jrsonnet-stdlib/src/manifest/xml.rs:169:16
|
169 | out.push_str(&str);
| ^^^^ help: change this to: `str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 122 in crates/jrsonnet-stdlib/src/manifest/xml.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/jrsonnet-stdlib/src/manifest/xml.rs:122:18
|
122 | buf.push_str(&tag);
| ^^^^ help: change this to: `tag`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 117 in crates/jrsonnet-stdlib/src/manifest/xml.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/jrsonnet-stdlib/src/manifest/xml.rs:117:21
|
117 | manifest_jsonml(&child, buf, opts)?;
| ^^^^^^ help: change this to: `child`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 96 in crates/jrsonnet-stdlib/src/manifest/xml.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/jrsonnet-stdlib/src/manifest/xml.rs:96:17
|
96 | buf.push_str(&tag);
| ^^^^ help: change this to: `tag`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-W clippy::needless-borrow` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`
Check warning on line 47 in crates/jrsonnet-stdlib/src/manifest/xml.rs
github-actions / clippy
length comparison to one
warning: length comparison to one
--> crates/jrsonnet-stdlib/src/manifest/xml.rs:47:6
|
47 | if arr.len() < 1 {
| ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `arr.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `-W clippy::len-zero` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::len_zero)]`
Check warning on line 119 in crates/jrsonnet-stdlib/src/manifest/toml.rs
github-actions / clippy
unnecessary `!=` operation
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)]`
Check warning on line 4 in crates/jrsonnet-stdlib/src/manifest/xml.rs
github-actions / clippy
unused imports: `ArrValue`, `Either4`, `Either`, `IndexableVal`
warning: unused imports: `ArrValue`, `Either4`, `Either`, `IndexableVal`
--> crates/jrsonnet-stdlib/src/manifest/xml.rs:4:26
|
4 | typed::{ComplexValType, Either4, Typed, ValType},
| ^^^^^^^
5 | val::{ArrValue, IndexableVal},
| ^^^^^^^^ ^^^^^^^^^^^^
6 | Either, ObjValue, Result, ResultExt, Val,
| ^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Check warning on line 91 in crates/jrsonnet-evaluator/src/obj.rs
github-actions / clippy
usage of wildcard import
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)]`
Check warning on line 546 in crates/jrsonnet-evaluator/src/integrations/serde.rs
github-actions / clippy
this type has already been used as a bound predicate
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
Check warning on line 533 in crates/jrsonnet-evaluator/src/integrations/serde.rs
github-actions / clippy
this type has already been used as a bound predicate
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
Check warning on line 509 in crates/jrsonnet-evaluator/src/integrations/serde.rs
github-actions / clippy
this type has already been used as a bound predicate
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
Check warning on line 416 in crates/jrsonnet-evaluator/src/integrations/serde.rs
github-actions / clippy
this type has already been used as a bound predicate
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
Check warning on line 399 in crates/jrsonnet-evaluator/src/integrations/serde.rs
github-actions / clippy
this type has already been used as a bound predicate
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
Check warning on line 373 in crates/jrsonnet-evaluator/src/integrations/serde.rs
github-actions / clippy
this type has already been used as a bound predicate
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
Check warning on line 372 in crates/jrsonnet-evaluator/src/integrations/serde.rs
github-actions / clippy
this type has already been used as a bound predicate
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
Check warning on line 361 in crates/jrsonnet-evaluator/src/integrations/serde.rs
github-actions / clippy
this type has already been used as a bound predicate
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
Check warning on line 351 in crates/jrsonnet-evaluator/src/integrations/serde.rs
github-actions / clippy
this type has already been used as a bound predicate
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
= 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)]`
Check warning on line 14 in crates/jrsonnet-evaluator/src/lib.rs
github-actions / clippy
pub(crate) import inside private module
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
... |
13 | | mod evaluate;
14 | | pub mod function;
| |_
|
::: crates/jrsonnet-evaluator/src/arr/mod.rs:14:1
|
14 | 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)]`
Check warning on line 366 in crates/jrsonnet-evaluator/src/val.rs
github-actions / clippy
unknown lint: `clippy::unconditional_recursion`
warning: unknown lint: `clippy::unconditional_recursion`
--> crates/jrsonnet-evaluator/src/val.rs:366:10
|
366 | #[allow(clippy::unconditional_recursion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `unconditional_recursion`
|
= note: `#[warn(unknown_lints)]` on by default
Check warning on line 5 in crates/jrsonnet-evaluator/src/val.rs
github-actions / clippy
unused import: `NonZeroUsize`
warning: unused import: `NonZeroUsize`
--> crates/jrsonnet-evaluator/src/val.rs:5:20
|
5 | num::{NonZeroU32, NonZeroUsize},
| ^^^^^^^^^^^^
Check warning on line 3 in crates/jrsonnet-evaluator/src/arr/mod.rs
github-actions / clippy
unused import: `NonZeroUsize`
warning: unused import: `NonZeroUsize`
--> crates/jrsonnet-evaluator/src/arr/mod.rs:3:20
|
3 | num::{NonZeroU32, NonZeroUsize},
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Check warning on line 221 in crates/jrsonnet-macros/src/lib.rs
github-actions / clippy
redundant clone
warning: redundant clone
--> crates/jrsonnet-macros/src/lib.rs:221:20
|
221 | let item_fn = item.clone();
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> crates/jrsonnet-macros/src/lib.rs:221:16
|
221 | let item_fn = item.clone();
| ^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `-W clippy::redundant-clone` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::redundant_clone)]`