Skip to content

add missing parameter for stats,min,max,count,sum,avg #3177

add missing parameter for stats,min,max,count,sum,avg

add missing parameter for stats,min,max,count,sum,avg #3177

GitHub Actions / clippy succeeded Aug 28, 2023 in 0s

clippy

25 warnings

Details

Results

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

Versions

  • rustc 1.72.0 (5680fa18f 2023-08-23)
  • cargo 1.72.0 (103a7ff2e 2023-08-15)
  • clippy 0.1.72 (5680fa1 2023-08-23)

Annotations

Check warning on line 684 in src/snippet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

an array of `Range` that is only one element

warning: an array of `Range` that is only one element
   --> src/snippet/mod.rs:684:66
    |
684 |         assert_eq!(&collapse_overlapped_ranges(&[0..3, 1..2,]), &[0..3]);
    |                                                                  ^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_range_in_vec_init
help: if you wanted a `Vec` that contains the entire range, try
    |
684 |         assert_eq!(&collapse_overlapped_ranges(&[0..3, 1..2,]), &(0..3).collect::<std::vec::Vec<usize>>());
    |                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted an array of len 3, try
    |
684 |         assert_eq!(&collapse_overlapped_ranges(&[0..3, 1..2,]), &[0; 3]);
    |                                                                   ~~~~

Check warning on line 683 in src/snippet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

an array of `Range` that is only one element

warning: an array of `Range` that is only one element
   --> src/snippet/mod.rs:683:66
    |
683 |         assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..3,]), &[0..3]);
    |                                                                  ^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_range_in_vec_init
help: if you wanted a `Vec` that contains the entire range, try
    |
683 |         assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..3,]), &(0..3).collect::<std::vec::Vec<usize>>());
    |                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted an array of len 3, try
    |
683 |         assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..3,]), &[0; 3]);
    |                                                                   ~~~~

Check warning on line 682 in src/snippet/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

an array of `Range` that is only one element

warning: an array of `Range` that is only one element
   --> src/snippet/mod.rs:682:66
    |
682 |         assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..2,]), &[0..2]);
    |                                                                  ^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_range_in_vec_init
    = note: `#[warn(clippy::single_range_in_vec_init)]` on by default
help: if you wanted a `Vec` that contains the entire range, try
    |
682 |         assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..2,]), &(0..2).collect::<std::vec::Vec<usize>>());
    |                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted an array of len 2, try
    |
682 |         assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..2,]), &[0; 2]);
    |                                                                   ~~~~

Check warning on line 78 in src/query/phrase_query/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `vec!`

warning: useless use of `vec!`
  --> src/query/phrase_query/mod.rs:78:32
   |
78 |         let terms: Vec<Term> = vec!["a", "b", "c"]
   |                                ^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["a", "b", "c"]`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec

Check warning on line 122 in src/positions/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `vec!`

warning: useless use of `vec!`
   --> src/positions/mod.rs:122:43
    |
122 |         let mut output_delta_pos_buffer = vec![0u32; 5];
    |                                           ^^^^^^^^^^^^^ help: you can use an array directly: `[0u32; 5]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec

Check warning on line 1016 in src/fastfield/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `vec!`

warning: useless use of `vec!`
    --> src/fastfield/mod.rs:1016:23
     |
1016 |         let numbers = vec![1000, 1001, 1003];
     |                       ^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[1000, 1001, 1003]`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec

Check warning on line 942 in src/fastfield/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `vec!`

warning: useless use of `vec!`
   --> src/fastfield/mod.rs:942:23
    |
942 |         let numbers = vec![100, 200, 300];
    |                       ^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[100, 200, 300]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec

Check warning on line 473 in src/aggregation/metric/percentiles.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `vec!`

warning: useless use of `vec!`
   --> src/aggregation/metric/percentiles.rs:473:37
    |
473 |         let num_values_in_segment = vec![100, 30_000, 8000];
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[100, 30_000, 8000]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
    = note: `#[warn(clippy::useless_vec)]` on by default

Check warning on line 518 in src/schema/schema.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
   --> src/schema/schema.rs:518:50
    |
518 |         assert_eq!(&super::locate_splitting_dots(r#"a\..b.c"#), &[3, 5]);
    |                                                  ^^^^^^^^^^^^ help: try: `r"a\..b.c"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 517 in src/schema/schema.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
   --> src/schema/schema.rs:517:50
    |
517 |         assert_eq!(&super::locate_splitting_dots(r#"a\.b.c"#), &[4]);
    |                                                  ^^^^^^^^^^^ help: try: `r"a\.b.c"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 1737 in src/query/query_parser/query_parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
    --> src/query/query_parser/query_parser.rs:1737:46
     |
1737 |         let query = query_parser.parse_query(r#"a\.b:hello"#).unwrap();
     |                                              ^^^^^^^^^^^^^^^ help: try: `r"a\.b:hello"`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 1734 in src/query/query_parser/query_parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
    --> src/query/query_parser/query_parser.rs:1734:39
     |
1734 |         schema_builder.add_text_field(r#"a\.b"#, STRING);
     |                                       ^^^^^^^^^ help: try: `r"a\.b"`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 1308 in src/query/query_parser/query_parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
    --> src/query/query_parser/query_parser.rs:1308:42
     |
1308 |             extract_query_term_json_path(r#"json.k8s\.node\.name:hello"#),
     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r"json.k8s\.node\.name:hello"`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 1101 in src/fastfield/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
    --> src/fastfield/mod.rs:1101:32
     |
1101 |             .column_opt::<i64>(r#"json.attr\.age"#)
     |                                ^^^^^^^^^^^^^^^^^^^ help: try: `r"json.attr\.age"`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 33 in src/aggregation/bucket/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

private item shadows public glob re-export

warning: private item shadows public glob re-export
  --> src/aggregation/bucket/mod.rs:33:16
   |
33 | pub(crate) use range::SegmentRangeCollector;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: the name `SegmentRangeCollector` in the type namespace is supposed to be publicly re-exported here
  --> src/aggregation/bucket/mod.rs:34:9
   |
34 | pub use range::*;
   |         ^^^^^^^^
note: but the private item here shadows it
  --> src/aggregation/bucket/mod.rs:33:16
   |
33 | pub(crate) use range::SegmentRangeCollector;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 31 in src/aggregation/bucket/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

private item shadows public glob re-export

warning: private item shadows public glob re-export
  --> src/aggregation/bucket/mod.rs:31:16
   |
31 | pub(crate) use histogram::SegmentHistogramCollector;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: the name `SegmentHistogramCollector` in the type namespace is supposed to be publicly re-exported here
  --> src/aggregation/bucket/mod.rs:32:9
   |
32 | pub use histogram::*;
   |         ^^^^^^^^^^^^
note: but the private item here shadows it
  --> src/aggregation/bucket/mod.rs:31:16
   |
31 | pub(crate) use histogram::SegmentHistogramCollector;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: `#[warn(hidden_glob_reexports)]` on by default

Check warning on line 130 in src/indexer/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
   --> src/indexer/mod.rs:130:30
    |
130 |                 .parse_query(r#"json.k8s\.container\.name:prometheus"#)
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r"json.k8s\.container\.name:prometheus"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 92 in src/indexer/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
  --> src/indexer/mod.rs:92:30
   |
92 |                 .parse_query(r#"json.k8s\.container\.name:prometheus"#)
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r"json.k8s\.container\.name:prometheus"`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 636 in src/core/json_utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
   --> src/core/json_utils.rs:636:41
    |
636 |         let json_path = split_json_path(r#"toto\titi"#);
    |                                         ^^^^^^^^^^^^^^ help: try: `r"toto\titi"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 631 in src/core/json_utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
   --> src/core/json_utils.rs:631:34
    |
631 |         assert_eq!(&json_path, &[r#"toto\titi"#]);
    |                                  ^^^^^^^^^^^^^^ help: try: `r"toto\titi"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 630 in src/core/json_utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
   --> src/core/json_utils.rs:630:41
    |
630 |         let json_path = split_json_path(r#"toto\\titi"#);
    |                                         ^^^^^^^^^^^^^^^ help: try: `r"toto\\titi"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 624 in src/core/json_utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
   --> src/core/json_utils.rs:624:43
    |
624 |         let json_path_2 = split_json_path(r#"k8s\.container\.name"#);
    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r"k8s\.container\.name"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

Check warning on line 622 in src/core/json_utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
   --> src/core/json_utils.rs:622:41
    |
622 |         let json_path = split_json_path(r#"toto\.titi"#);
    |                                         ^^^^^^^^^^^^^^^ help: try: `r"toto\.titi"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    = note: `#[warn(clippy::needless_raw_string_hashes)]` on by default

Check warning on line 33 in src/aggregation/bucket/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

private item shadows public glob re-export

warning: private item shadows public glob re-export
  --> src/aggregation/bucket/mod.rs:33:16
   |
33 | pub(crate) use range::SegmentRangeCollector;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: the name `SegmentRangeCollector` in the type namespace is supposed to be publicly re-exported here
  --> src/aggregation/bucket/mod.rs:34:9
   |
34 | pub use range::*;
   |         ^^^^^^^^
note: but the private item here shadows it
  --> src/aggregation/bucket/mod.rs:33:16
   |
33 | pub(crate) use range::SegmentRangeCollector;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 31 in src/aggregation/bucket/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

private item shadows public glob re-export

warning: private item shadows public glob re-export
  --> src/aggregation/bucket/mod.rs:31:16
   |
31 | pub(crate) use histogram::SegmentHistogramCollector;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: the name `SegmentHistogramCollector` in the type namespace is supposed to be publicly re-exported here
  --> src/aggregation/bucket/mod.rs:32:9
   |
32 | pub use histogram::*;
   |         ^^^^^^^^^^^^
note: but the private item here shadows it
  --> src/aggregation/bucket/mod.rs:31:16
   |
31 | pub(crate) use histogram::SegmentHistogramCollector;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: `#[warn(hidden_glob_reexports)]` on by default