Skip to content

preserve serde error info #415

preserve serde error info

preserve serde error info #415

GitHub Actions / clippy failed Jul 25, 2023 in 0s

clippy

7 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 7
Warning 0
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 failure on line 678 in src/mqtt_client/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`T` doesn't implement `core::fmt::Debug`

error[E0277]: `T` doesn't implement `core::fmt::Debug`
   --> src/mqtt_client/mod.rs:678:37
    |
678 |         if write!(&mut msg, "{:?}", err).is_err() {
    |                                     ^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `core::fmt::Debug`
    |
    = note: this error originates in the macro `$crate::format_args` which comes from the expansion of the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T`
    |
675 | impl<const N: usize, T: core::fmt::Debug> From<crate::Error<T>> for Response<N> {
    |                       ++++++++++++++++++

Check failure on line 283 in src/mqtt_client/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the size for values of type `str` cannot be known at compilation time

error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> src/mqtt_client/mod.rs:283:17
    |
283 |             let Some(topic) = self.state.context_mut().republish_state.next() else {
    |                 ^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `core::marker::Sized` is not implemented for `str`
note: required by a bound in `core::prelude::v1::Some`
   --> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/option.rs:571:5

Check failure on line 283 in src/mqtt_client/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the size for values of type `str` cannot be known at compilation time

error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> src/mqtt_client/mod.rs:283:22
    |
283 |             let Some(topic) = self.state.context_mut().republish_state.next() else {
    |                      ^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `core::marker::Sized` is not implemented for `str`
    = note: all local variables must have a statically known size
    = help: unsized locals are gated as an unstable feature

Check failure on line 283 in src/mqtt_client/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `next` exists for struct `MiniconfIter<Settings, 8, 128, JsonCoreSlash>`, but its trait bounds were not satisfied

error[E0599]: the method `next` exists for struct `MiniconfIter<Settings, 8, 128, JsonCoreSlash>`, but its trait bounds were not satisfied
   --> src/mqtt_client/mod.rs:283:72
    |
283 |             let Some(topic) = self.state.context_mut().republish_state.next() else {
    |                                                                        ^^^^ method cannot be called on `MiniconfIter<Settings, 8, 128, JsonCoreSlash>` due to unsatisfied trait bounds
    |
   ::: src/iter.rs:7:1
    |
7   | pub struct MiniconfIter<M: ?Sized, const L: usize, const TS: usize, S> {
    | ----------------------------------------------------------------------
    | |
    | method `next` not found for this struct
    | doesn't satisfy `_: Iterator`
    |
note: trait bound `Settings: SerDe<JsonCoreSlash>` was not satisfied
   --> src/iter.rs:62:20
    |
62  | impl<M: Miniconf + SerDe<S> + ?Sized, const L: usize, const TS: usize, S> Iterator
    |                    ^^^^^^^^ unsatisfied trait bound introduced here       --------
63  |     for MiniconfIter<M, L, TS, S>
    |         -------------------------
help: consider restricting the type parameter to satisfy the trait bound
   --> src/iter.rs:7:71
    |
7   | pub struct MiniconfIter<M: ?Sized, const L: usize, const TS: usize, S> where Settings: SerDe<JsonCoreSlash> {
    |                                                                        ++++++++++++++++++++++++++++++++++++

Check failure on line 249 in src/mqtt_client/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the size for values of type `str` cannot be known at compilation time

error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> src/mqtt_client/mod.rs:249:23
    |
249 |                 .map(|path| Response::custom(ResponseCode::Continue, &path))
    |                       ^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `core::marker::Sized` is not implemented for `str`
help: function arguments must have a statically known size, borrowed types always have a known size
    |
249 |                 .map(|&path| Response::custom(ResponseCode::Continue, &path))
    |                       +

Check failure on line 248 in src/mqtt_client/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `next` exists for mutable reference `&mut MiniconfIter<Settings, 8, 128, JsonCoreSlash>`, but its trait bounds were not satisfied

error[E0599]: the method `next` exists for mutable reference `&mut MiniconfIter<Settings, 8, 128, JsonCoreSlash>`, but its trait bounds were not satisfied
   --> src/mqtt_client/mod.rs:248:18
    |
247 |               let response: Response<MAX_TOPIC_LENGTH> = iter
    |  ________________________________________________________-
248 | |                 .next()
    | |                 -^^^^ method cannot be called on `&mut MiniconfIter<Settings, 8, 128, JsonCoreSlash>` due to unsatisfied trait bounds
    | |_________________|
    | 
    |
   ::: src/iter.rs:7:1
    |
7   |   pub struct MiniconfIter<M: ?Sized, const L: usize, const TS: usize, S> {
    |   ---------------------------------------------------------------------- doesn't satisfy `_: Iterator`
    |
note: trait bound `Settings: SerDe<JsonCoreSlash>` was not satisfied
   --> src/iter.rs:62:20
    |
62  | impl<M: Miniconf + SerDe<S> + ?Sized, const L: usize, const TS: usize, S> Iterator
    |                    ^^^^^^^^ unsatisfied trait bound introduced here       --------
63  |     for MiniconfIter<M, L, TS, S>
    |         -------------------------
    = note: the following trait bounds were not satisfied:
            `iter::MiniconfIter<Settings, 8, 128, JsonCoreSlash>: core::iter::Iterator`
            which is required by `&mut iter::MiniconfIter<Settings, 8, 128, JsonCoreSlash>: core::iter::Iterator`
note: the trait `core::iter::Iterator` must be implemented
   --> /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/iter/traits/iterator.rs:73:1
help: consider restricting the type parameter to satisfy the trait bound
   --> src/iter.rs:7:71
    |
7   | pub struct MiniconfIter<M: ?Sized, const L: usize, const TS: usize, S> where Settings: SerDe<JsonCoreSlash> {
    |                                                                        ++++++++++++++++++++++++++++++++++++

Check failure on line 219 in src/mqtt_client/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the function or associated item `metadata` exists for struct `MiniconfIter<Settings, 8, 128, JsonCoreSlash>`, but its trait bounds were not satisfied

error[E0599]: the function or associated item `metadata` exists for struct `MiniconfIter<Settings, 8, 128, JsonCoreSlash>`, but its trait bounds were not satisfied
   --> src/mqtt_client/mod.rs:219:46
    |
219 |         let meta = MiniconfIter::<Settings>::metadata().unwrap();
    |                                              ^^^^^^^^ function or associated item cannot be called on `MiniconfIter<Settings, 8, 128, JsonCoreSlash>` due to unsatisfied trait bounds
    |
   ::: src/iter.rs:7:1
    |
7   | pub struct MiniconfIter<M: ?Sized, const L: usize, const TS: usize, S> {
    | ---------------------------------------------------------------------- function or associated item `metadata` not found for this struct
    |
note: trait bound `Settings: SerDe<JsonCoreSlash>` was not satisfied
   --> src/iter.rs:38:29
    |
38  | impl<M: ?Sized + Miniconf + SerDe<S>, const L: usize, const TS: usize, S>
    |                             ^^^^^^^^ unsatisfied trait bound introduced here
39  |     MiniconfIter<M, L, TS, S>
    |     -------------------------