Skip to content

Merge pull request #109 from domodwyer/dependabot/cargo/bytes-1.7.0 #225

Merge pull request #109 from domodwyer/dependabot/cargo/bytes-1.7.0

Merge pull request #109 from domodwyer/dependabot/cargo/bytes-1.7.0 #225

GitHub Actions / clippy succeeded Aug 1, 2024 in 0s

clippy

8 warnings

Details

Results

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

Versions

  • rustc 1.79.0 (129f3b996 2024-06-10)
  • cargo 1.79.0 (ffa9cf99a 2024-06-03)
  • clippy 0.1.79 (129f3b9 2024-06-10)

Annotations

Check warning on line 98 in src/lib.rs

See this annotation in the file changed.

@github-actions 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
  --> src/lib.rs:98:37
   |
98 |         print_types(&mut out, &ast, &self.derive.as_str())?;
   |                                     ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.derive.as_str()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `#[warn(clippy::needless_borrow)]` on by default

Check warning on line 117 in src/ast/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
   --> src/ast/mod.rs:117:24
    |
117 |             Node::Type(BasicType::try_from(ast.as_str()).expect("unrecognised type"))
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: converting `&str` to `BasicType` cannot fail
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
help: use
    |
117 -             Node::Type(BasicType::try_from(ast.as_str()).expect("unrecognised type"))
117 +             Node::Type(BasicType::from(ast.as_str()))
    |

Check warning on line 97 in src/ast/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
  --> src/ast/mod.rs:97:28
   |
97 |             if let Ok(t) = BasicType::try_from(ast.as_str()) {
   |                            ^^^^^^^^^^^^^^^^^^^ help: use: `From::from`
   |
   = note: converting `&str` to `BasicType` cannot fail
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
   = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default

Check warning on line 66 in src/ast/array.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `unwrap_or_else` to construct default value

warning: use of `unwrap_or_else` to construct default value
  --> src/ast/array.rs:66:14
   |
66 |             .unwrap_or_else(|| "".to_string());
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
   = note: `#[warn(clippy::unwrap_or_default)]` on by default

Check warning on line 23 in src/ast/node.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

name `EOF` contains a capitalized acronym

warning: name `EOF` contains a capitalized acronym
  --> src/ast/node.rs:23:5
   |
23 |     EOF,
   |     ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Eof`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
   = note: `#[warn(clippy::upper_case_acronyms)]` on by default

Check warning on line 82 in src/ast/basic_type.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this lifetime isn't used in the impl

warning: this lifetime isn't used in the impl
  --> src/ast/basic_type.rs:82:6
   |
82 | impl<'a> From<String> for BasicType {
   |      ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes

Check warning on line 59 in src/ast/basic_type.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this lifetime isn't used in the impl

warning: this lifetime isn't used in the impl
  --> src/ast/basic_type.rs:59:6
   |
59 | impl<'a> std::fmt::Display for BasicType {
   |      ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes

Check warning on line 15 in src/ast/basic_type.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this lifetime isn't used in the impl

warning: this lifetime isn't used in the impl
  --> src/ast/basic_type.rs:15:6
   |
15 | impl<'a> BasicType {
   |      ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
   = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default