Skip to content
GitHub Actions / clippy failed Jan 1, 2024 in 0s

clippy

25 errors, 13 warnings

Details

Results

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

Versions

  • rustc 1.77.0-nightly (e51e98dde 2023-12-31)
  • cargo 1.77.0-nightly (ac6bbb332 2023-12-26)
  • clippy 0.1.77 (e51e98d 2023-12-31)

Annotations

Check failure on line 10 in azure-kusto-data/src/operations/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

expected `{async block@azure-kusto-data/src/operations/v2.rs:14:42: 22:6}` to be a future that resolves to `Option<(Result<Frame, Error>, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>`, but it resolves to `Result<Option<(_, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>, _>`

error[E0271]: expected `{async block@azure-kusto-data/src/operations/v2.rs:14:42: 22:6}` to be a future that resolves to `Option<(Result<Frame, Error>, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>`, but it resolves to `Result<Option<(_, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>, _>`
  --> azure-kusto-data/src/operations/v2.rs:10:6
   |
10 | ) -> impl Stream<Item = Result<v2::Frame, io::Error>> {
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result<Option<(_, &mut ...)>, ...>`, found `Option<(Result<Frame, Error>, ...)>`
   |
   = note: expected enum `std::result::Result<std::option::Option<(_, &mut futures::io::BufReader<_>)>, _>`
              found enum `std::option::Option<(std::result::Result<models::v2::Frame, std::io::Error>, &mut futures::io::BufReader<_>)>`
   = note: required for `Unfold<&mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>, {closure@v2.rs:14:33}, ...>` to implement `futures::Stream`
   = note: the full type name has been written to '/home/runner/work/azure-kusto-rust/azure-kusto-rust/target/debug/deps/azure_kusto_data-bea9337dce48b219.long-type-15673669992488279962.txt'

Check failure on line 10 in azure-kusto-data/src/operations/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

expected `{async block@azure-kusto-data/src/operations/v2.rs:14:42: 22:6}` to be a future that resolves to `Option<(_, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>`, but it resolves to `Result<Option<(_, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>, _>`

error[E0271]: expected `{async block@azure-kusto-data/src/operations/v2.rs:14:42: 22:6}` to be a future that resolves to `Option<(_, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>`, but it resolves to `Result<Option<(_, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>, _>`
  --> azure-kusto-data/src/operations/v2.rs:10:6
   |
10 | ) -> impl Stream<Item = Result<v2::Frame, io::Error>> {
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result<Option<(_, &mut ...)>, ...>`, found `Option<(_, &mut BufReader<...>)>`
   |
   = note: expected enum `std::result::Result<std::option::Option<(_, &mut futures::io::BufReader<_>)>, _>`
              found enum `std::option::Option<(_, &mut futures::io::BufReader<_>)>`
   = note: required for `Unfold<&mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>, {closure@v2.rs:14:33}, ...>` to implement `futures::Stream`
   = note: the full type name has been written to '/home/runner/work/azure-kusto-rust/azure-kusto-rust/target/debug/deps/azure_kusto_data-bea9337dce48b219.long-type-15673669992488279962.txt'

Check failure on line 14 in azure-kusto-data/src/operations/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

expected `{async block@azure-kusto-data/src/operations/v2.rs:14:42: 22:6}` to be a future that resolves to `Option<(_, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>`, but it resolves to `Result<Option<(_, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>, _>`

error[E0271]: expected `{async block@azure-kusto-data/src/operations/v2.rs:14:42: 22:6}` to be a future that resolves to `Option<(_, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>`, but it resolves to `Result<Option<(_, &mut BufReader<ToJsonLinesReader<impl AsyncBufRead>>)>, _>`
  --> azure-kusto-data/src/operations/v2.rs:14:5
   |
14 |     stream::unfold(&mut reader, |reader| async move {
   |     ^^^^^^^^^^^^^^ expected `Option<(_, &mut BufReader<...>)>`, found `Result<Option<(_, &mut ...)>, ...>`
   |
   = note: expected enum `std::option::Option<(_, &mut futures::io::BufReader<_>)>`
              found enum `std::result::Result<std::option::Option<(_, &mut futures::io::BufReader<_>)>, _>`
note: required by a bound in `futures::stream::unfold`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/stream/unfold.rs:53:17
   |
50 | pub fn unfold<T, F, Fut, Item>(init: T, f: F) -> Unfold<T, F, Fut>
   |        ------ required by a bound in this function
...
53 |     Fut: Future<Output = Option<(Item, T)>>,
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `unfold`

Check failure on line 16 in azure-kusto-data/src/operations/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`impl AsyncBufRead` cannot be unpinned

error[E0277]: `impl AsyncBufRead` cannot be unpinned
  --> azure-kusto-data/src/operations/v2.rs:16:55
   |
16 |         let read = reader.read_until(b'\n', &mut buf).await?;
   |                                                       ^^^^^ within `futures::io::buf_reader::_::__Origin<'_, operations::skip_reader::ToJsonLinesReader<impl AsyncBufRead>>`, the trait `std::marker::Unpin` is not implemented for `impl AsyncBufRead`
   |
   = note: consider using the `pin!` macro
           consider using `Box::pin` if you need to access the pinned value outside of the current scope
note: required because it appears within the type `operations::skip_reader::ToJsonLinesReader<impl AsyncBufRead>`
  --> azure-kusto-data/src/operations/skip_reader.rs:7:12
   |
7  | pub struct ToJsonLinesReader<T: AsyncRead> {
   |            ^^^^^^^^^^^^^^^^^
note: required because it appears within the type `futures::io::buf_reader::_::__Origin<'_, operations::skip_reader::ToJsonLinesReader<impl AsyncBufRead>>`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/io/buf_reader.rs:11:1
   |
11 | / pin_project! {
12 | |     /// The `BufReader` struct adds buffering to any reader.
13 | |     ///
14 | |     /// It can be excessively inefficient to work directly with a [`AsyncRead`]
...  |
37 | |     }
38 | | }
   | |_^
   = note: required for `futures::io::BufReader<operations::skip_reader::ToJsonLinesReader<impl AsyncBufRead>>` to implement `std::marker::Unpin`
   = note: required for `futures::io::ReadUntil<'_, futures::io::BufReader<operations::skip_reader::ToJsonLinesReader<impl AsyncBufRead>>>` to implement `futures::Future`
   = note: required for `futures::io::ReadUntil<'_, futures::io::BufReader<operations::skip_reader::ToJsonLinesReader<impl AsyncBufRead>>>` to implement `std::future::IntoFuture`
   = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
help: remove the `.await`
   |
16 -         let read = reader.read_until(b'\n', &mut buf).await?;
16 +         let read = reader.read_until(b'\n', &mut buf)?;
   |
help: consider further restricting this bound
   |
9  |     reader: (impl AsyncBufRead + std::marker::Unpin),
   |                                ++++++++++++++++++++

Check failure on line 16 in azure-kusto-data/src/operations/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`impl AsyncBufRead` cannot be unpinned

error[E0277]: `impl AsyncBufRead` cannot be unpinned
   --> azure-kusto-data/src/operations/v2.rs:16:27
    |
16  |         let read = reader.read_until(b'\n', &mut buf).await?;
    |                           ^^^^^^^^^^ within `futures::io::buf_reader::_::__Origin<'_, operations::skip_reader::ToJsonLinesReader<impl AsyncBufRead>>`, the trait `std::marker::Unpin` is not implemented for `impl AsyncBufRead`
    |
    = note: consider using the `pin!` macro
            consider using `Box::pin` if you need to access the pinned value outside of the current scope
note: required because it appears within the type `operations::skip_reader::ToJsonLinesReader<impl AsyncBufRead>`
   --> azure-kusto-data/src/operations/skip_reader.rs:7:12
    |
7   | pub struct ToJsonLinesReader<T: AsyncRead> {
    |            ^^^^^^^^^^^^^^^^^
note: required because it appears within the type `futures::io::buf_reader::_::__Origin<'_, operations::skip_reader::ToJsonLinesReader<impl AsyncBufRead>>`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/io/buf_reader.rs:11:1
    |
11  | / pin_project! {
12  | |     /// The `BufReader` struct adds buffering to any reader.
13  | |     ///
14  | |     /// It can be excessively inefficient to work directly with a [`AsyncRead`]
...   |
37  | |     }
38  | | }
    | |_^
    = note: required for `futures::io::BufReader<operations::skip_reader::ToJsonLinesReader<impl AsyncBufRead>>` to implement `std::marker::Unpin`
note: required by a bound in `futures::AsyncBufReadExt::read_until`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/io/mod.rs:721:15
    |
719 |     fn read_until<'a>(&'a mut self, byte: u8, buf: &'a mut Vec<u8>) -> ReadUntil<'a, Self>
    |        ---------- required by a bound in this associated function
720 |     where
721 |         Self: Unpin,
    |               ^^^^^ required by this bound in `AsyncBufReadExt::read_until`
    = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider further restricting this bound
    |
9   |     reader: (impl AsyncBufRead + std::marker::Unpin),
    |                                ++++++++++++++++++++

Check failure on line 47 in azure-kusto-data/src/credentials.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

lifetime parameters or bounds on method `get_token` do not match the trait declaration

error[E0195]: lifetime parameters or bounds on method `get_token` do not match the trait declaration
  --> azure-kusto-data/src/credentials.rs:47:14
   |
47 |     async fn get_token(&self, resource: &str) -> azure_core::Result<AccessToken> {
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait

Check failure on line 18 in azure-kusto-data/src/credentials.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

lifetime parameters or bounds on method `get_token` do not match the trait declaration

error[E0195]: lifetime parameters or bounds on method `get_token` do not match the trait declaration
  --> azure-kusto-data/src/credentials.rs:18:14
   |
18 |     async fn get_token(&self, _resource: &str) -> azure_core::Result<AccessToken> {
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait

Check failure on line 251 in azure-kusto-data/src/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
   --> azure-kusto-data/src/client.rs:251:13
    |
250 |         Ok(serde_json::from_value::<Vec<T>>(serde_json::Value::Array(
    |                                             ------------------------ arguments to this enum variant are incorrect
251 |             results.rows,
    |             ^^^^^^^^^^^^ expected `Vec<Value>`, found `Vec<Row>`
    |
    = note: expected struct `std::vec::Vec<serde_json::Value>`
               found struct `std::vec::Vec<models::v2::Row>`
note: tuple variant defined here
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.109/src/value/mod.rs:160:5
    |
160 |     Array(Vec<Value>),
    |     ^^^^^

Check warning on line 5 in azure-kusto-data/src/types/timespan.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused imports: `Deserialize`, `Serialize`, `Serializer`

warning: unused imports: `Deserialize`, `Serialize`, `Serializer`
 --> azure-kusto-data/src/types/timespan.rs:5:13
  |
5 | use serde::{Deserialize, Serialize, Serializer};
  |             ^^^^^^^^^^^  ^^^^^^^^^  ^^^^^^^^^^

Check warning on line 9 in azure-kusto-data/src/types/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `time::OffsetDateTime`

warning: unused import: `time::OffsetDateTime`
 --> azure-kusto-data/src/types/mod.rs:9:5
  |
9 | use time::OffsetDateTime;
  |     ^^^^^^^^^^^^^^^^^^^^

Check warning on line 8 in azure-kusto-data/src/types/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `std::str::FromStr`

warning: unused import: `std::str::FromStr`
 --> azure-kusto-data/src/types/mod.rs:8:5
  |
8 | use std::str::FromStr;
  |     ^^^^^^^^^^^^^^^^^

Check warning on line 7 in azure-kusto-data/src/types/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `std::ops::Deref`

warning: unused import: `std::ops::Deref`
 --> azure-kusto-data/src/types/mod.rs:7:5
  |
7 | use std::ops::Deref;
  |     ^^^^^^^^^^^^^^^

Check warning on line 6 in azure-kusto-data/src/types/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `std::fmt::Debug`

warning: unused import: `std::fmt::Debug`
 --> azure-kusto-data/src/types/mod.rs:6:5
  |
6 | use std::fmt::Debug;
  |     ^^^^^^^^^^^^^^^

Check warning on line 5 in azure-kusto-data/src/types/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused imports: `Deserialize`, `Serialize`, `Serializer`

warning: unused imports: `Deserialize`, `Serialize`, `Serializer`
 --> azure-kusto-data/src/types/mod.rs:5:13
  |
5 | use serde::{Deserialize, Serialize, Serializer};
  |             ^^^^^^^^^^^  ^^^^^^^^^  ^^^^^^^^^^

Check warning on line 4 in azure-kusto-data/src/types/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused imports: `Display`, `From`, `Into`

warning: unused imports: `Display`, `From`, `Into`
 --> azure-kusto-data/src/types/mod.rs:4:19
  |
4 | use derive_more::{Display, From, Into};
  |                   ^^^^^^^  ^^^^  ^^^^

Check warning on line 3 in azure-kusto-data/src/types/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `azure_core::error::ResultExt`

warning: unused import: `azure_core::error::ResultExt`
 --> azure-kusto-data/src/types/mod.rs:3:5
  |
3 | use azure_core::error::ResultExt;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 9 in azure-kusto-data/src/operations/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary parentheses around type

warning: unnecessary parentheses around type
 --> azure-kusto-data/src/operations/v2.rs:9:13
  |
9 |     reader: (impl AsyncBufRead),
  |             ^                 ^
  |
  = note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
  |
9 -     reader: (impl AsyncBufRead),
9 +     reader: impl AsyncBufRead,
  |

Check warning on line 2 in azure-kusto-data/src/operations/skip_reader.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `AsyncBufRead`

warning: unused import: `AsyncBufRead`
 --> azure-kusto-data/src/operations/skip_reader.rs:2:15
  |
2 | use futures::{AsyncBufRead, AsyncRead, AsyncReadExt};
  |               ^^^^^^^^^^^^

Check warning on line 20 in azure-kusto-data/src/operations/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused imports: `Deserialize`, `Serialize`

warning: unused imports: `Deserialize`, `Serialize`
  --> azure-kusto-data/src/operations/query.rs:20:13
   |
20 | use serde::{Deserialize, Serialize};
   |             ^^^^^^^^^^^  ^^^^^^^^^

Check warning on line 1 in azure-kusto-data/src/models/v2/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
  --> azure-kusto-data/src/models/v2/mod.rs:1:5
   |
1  | use crate::models::v2::errors::OneApiError;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: the name `OneApiError` in the type namespace is supposed to be publicly re-exported here
  --> azure-kusto-data/src/models/v2/mod.rs:10:9
   |
10 | pub use errors::*;
   |         ^^^^^^^^^
note: but the private item here shadows it
  --> azure-kusto-data/src/models/v2/mod.rs:1:5
   |
1  | use crate::models::v2::errors::OneApiError;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: `#[warn(hidden_glob_reexports)]` on by default

Check warning on line 3 in azure-kusto-data/src/arrow.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `std::str::FromStr`

warning: unused import: `std::str::FromStr`
 --> azure-kusto-data/src/arrow.rs:3:5
  |
3 | use std::str::FromStr;
  |     ^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check failure on line 476 in azure-kusto-data/src/operations/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

cannot find type `DataSet` in this scope

error[E0412]: cannot find type `DataSet` in this scope
   --> azure-kusto-data/src/operations/query.rs:476:25
    |
476 |         let tables: Vec<DataSet> = serde_json::from_slice(&data)?;
    |                         ^^^^^^^ not found in this scope
    |
help: consider importing this type alias
    |
1   + use crate::models::v2::DataSet;
    |

Check failure on line 263 in azure-kusto-data/src/operations/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

failed to resolve: use of undeclared type `DataSet`

error[E0433]: failed to resolve: use of undeclared type `DataSet`
   --> azure-kusto-data/src/operations/query.rs:263:17
    |
263 |                 DataSet::TableCompletion(completion) => {
    |                 ^^^^^^^ use of undeclared type `DataSet`
    |
help: consider importing this type alias
    |
1   + use crate::models::v2::DataSet;
    |

Check failure on line 260 in azure-kusto-data/src/operations/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

failed to resolve: use of undeclared type `DataSet`

error[E0433]: failed to resolve: use of undeclared type `DataSet`
   --> azure-kusto-data/src/operations/query.rs:260:17
    |
260 |                 DataSet::TableProgress(progress) => {
    |                 ^^^^^^^ use of undeclared type `DataSet`
    |
help: consider importing this type alias
    |
1   + use crate::models::v2::DataSet;
    |

Check failure on line 253 in azure-kusto-data/src/operations/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

failed to resolve: use of undeclared type `DataSet`

error[E0433]: failed to resolve: use of undeclared type `DataSet`
   --> azure-kusto-data/src/operations/query.rs:253:17
    |
253 |                 DataSet::TableFragment(fragment) => {
    |                 ^^^^^^^ use of undeclared type `DataSet`
    |
help: consider importing this type alias
    |
1   + use crate::models::v2::DataSet;
    |