implement lenient parser #3197
clippy
5 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 5 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.71.0 (8ede3aae2 2023-07-12)
- cargo 1.71.0 (cfd3bbd8f 2023-06-08)
- clippy 0.1.71 (8ede3aa 2023-07-12)
Annotations
Check warning on line 691 in query-grammar/src/query_grammar.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> query-grammar/src/query_grammar.rs:691:6
|
691 | ) -> JResult<&str, (Option<BinaryOperand>, Option<Occur>, Option<UserInputAst>)> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
Check warning on line 572 in query-grammar/src/query_grammar.rs
github-actions / clippy
stripping a prefix manually
warning: stripping a prefix manually
--> query-grammar/src/query_grammar.rs:572:17
|
572 | &i[1..],
| ^^^^^^^
|
note: the prefix was tested here
--> query-grammar/src/query_grammar.rs:570:9
|
570 | if i.starts_with(']') {
| ^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip
help: try using the `strip_prefix` method
|
570 ~ if let Some(<stripped>) = i.strip_prefix(']') {
571 | break Ok((
572 ~ <stripped>,
|
Check warning on line 557 in query-grammar/src/query_grammar.rs
github-actions / clippy
length comparison to zero
warning: length comparison to zero
--> query-grammar/src/query_grammar.rs:557:12
|
557 | if i.len() == 0 {
| ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `i.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
Check warning on line 272 in query-grammar/src/query_grammar.rs
github-actions / clippy
stripping a prefix manually
warning: stripping a prefix manually
--> query-grammar/src/query_grammar.rs:272:23
|
272 | break Ok((&i[1..], (UserInputAst::Clause(terms), errs)));
| ^^^^^^^
|
note: the prefix was tested here
--> query-grammar/src/query_grammar.rs:271:9
|
271 | if i.starts_with(')') {
| ^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip
= note: `#[warn(clippy::manual_strip)]` on by default
help: try using the `strip_prefix` method
|
271 ~ if let Some(<stripped>) = i.strip_prefix(')') {
272 ~ break Ok((<stripped>, (UserInputAst::Clause(terms), errs)));
|
Check warning on line 267 in query-grammar/src/query_grammar.rs
github-actions / clippy
length comparison to zero
warning: length comparison to zero
--> query-grammar/src/query_grammar.rs:267:12
|
267 | if i.len() == 0 {
| ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `i.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default