Skip to content

implement lenient parser #3174

implement lenient parser

implement lenient parser #3174

GitHub Actions / clippy succeeded Jul 19, 2023 in 1s

clippy

6 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 6
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 93 in src/store/compressors.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

associated items `deser_from_str` and `ser_to_string` are never used

warning: associated items `deser_from_str` and `ser_to_string` are never used
   --> src/store/compressors.rs:93:8
    |
92  | impl ZstdCompressor {
    | ------------------- associated items in this implementation
93  |     fn deser_from_str(val: &str) -> Result<ZstdCompressor, String> {
    |        ^^^^^^^^^^^^^^
...
129 |     fn ser_to_string(&self) -> String {
    |        ^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 691 in query-grammar/src/query_grammar.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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