Merge pull request #122 from domodwyer/dependabot/cargo/thiserror-1.0.68 #253
clippy
8 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 8 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.81.0 (eeb90cda1 2024-09-04)
- cargo 1.81.0 (2dbb1af80 2024-08-20)
- clippy 0.1.81 (eeb90cd 2024-09-04)
Annotations
Check warning on line 98 in src/lib.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
--> 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
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
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
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
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
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
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
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