Skip to content

fixes #128

fixes #128 #241

GitHub Actions / clippy succeeded Sep 22, 2023 in 1s

clippy

4 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 4
Note 0
Help 0

Versions

  • rustc 1.72.1 (d5c2e9c34 2023-09-13)
  • cargo 1.72.1 (103a7ff2e 2023-08-15)
  • clippy 0.1.72 (d5c2e9c 2023-09-13)

Annotations

Check warning on line 164 in src/serde.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

length comparison to zero

warning: length comparison to zero
   --> src/serde.rs:164:31
    |
164 |     if valid_variants == 0 && e.variants().len() != 0 {
    |                               ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!e.variants().is_empty()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero

Check warning on line 557 in src/lang/ts/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent

warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
   --> src/lang/ts/mod.rs:557:31
    |
557 |     if let Some(first_char) = ident.chars().nth(0) {
    |                               ^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `ident.chars().next()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
    = note: `#[warn(clippy::iter_nth_zero)]` implied by `#[warn(clippy::all)]`

Check warning on line 369 in src/lang/ts/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

length comparison to zero

warning: length comparison to zero
   --> src/lang/ts/mod.rs:369:24
    |
369 |                     if obj.fields.len() == 0 {
    |                        ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `obj.fields.is_empty()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
note: the lint level is defined here
   --> src/lib.rs:3:9
    |
3   | #![warn(clippy::all, clippy::unwrap_used, clippy::panic)] // TODO: missing_docs
    |         ^^^^^^^^^^^
    = note: `#[warn(clippy::len_zero)]` implied by `#[warn(clippy::all)]`

Check warning on line 66 in src/lang/ts/reserved_terms.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constant `RESERVED_IDENTS` is never used

warning: constant `RESERVED_IDENTS` is never used
  --> src/lang/ts/reserved_terms.rs:66:18
   |
66 | pub(crate) const RESERVED_IDENTS: &[&str] = &[
   |                  ^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default