Skip to content

chore: Release

chore: Release #211

GitHub Actions / clippy succeeded Mar 15, 2024 in 1s

clippy

64 warnings

Details

Results

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

Versions

  • rustc 1.76.0 (07dca489a 2024-02-04)
  • cargo 1.76.0 (c84b36747 2024-01-18)
  • clippy 0.1.76 (07dca48 2024-02-04)

Annotations

Check warning on line 6 in examples/src/common/general/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of wildcard import

warning: usage of wildcard import
 --> examples/src/common/general/mod.rs:6:5
  |
6 | use responses::*;
  |     ^^^^^^^^^^^^ help: try: `responses::{ManufacturerId, ModelId, SoftwareVersion, WifiMac}`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
  = note: `-W clippy::wildcard-imports` implied by `-W clippy::pedantic`
  = help: to override `-W clippy::pedantic` add `#[allow(clippy::wildcard_imports)]`

Check warning on line 117 in atat/src/blocking/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary boolean `not` operation

warning: unnecessary boolean `not` operation
   --> atat/src/blocking/client.rs:111:9
    |
111 | /         if !Cmd::EXPECTS_RESPONSE_CODE {
112 | |             cmd.parse(Ok(&[]))
113 | |         } else {
114 | |             let response = self.wait_response(Duration::from_millis(Cmd::MAX_TIMEOUT_MS.into()))?;
115 | |             let response: &Response<INGRESS_BUF_SIZE> = &response.borrow();
116 | |             cmd.parse(response.into())
117 | |         }
    | |_________^
    |
    = help: remove the `!` and swap the blocks of the `if`/`else`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else

Check warning on line 109 in atat/src/blocking/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> atat/src/blocking/client.rs:109:29
    |
109 |         let len = cmd.write(&mut self.buf);
    |                             ^^^^^^^^^^^^^ help: change this to: `self.buf`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 68 in atat/src/blocking/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'guard

warning: the following explicit lifetimes could be elided: 'guard
  --> atat/src/blocking/client.rs:68:22
   |
68 |     fn wait_response<'guard>(
   |                      ^^^^^^
69 |         &'guard mut self,
   |          ^^^^^^
70 |         timeout: Duration,
71 |     ) -> Result<ResponseSlotGuard<'guard, INGRESS_BUF_SIZE>, Error> {
   |                                   ^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
68 ~     fn wait_response(
69 ~         &mut self,
70 |         timeout: Duration,
71 ~     ) -> Result<ResponseSlotGuard<'_, INGRESS_BUF_SIZE>, Error> {
   |

Check warning on line 155 in atat/src/asynch/simple_client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary boolean `not` operation

warning: unnecessary boolean `not` operation
   --> atat/src/asynch/simple_client.rs:144:9
    |
144 | /         if !Cmd::EXPECTS_RESPONSE_CODE {
145 | |             cmd.parse(Ok(&[]))
146 | |         } else {
147 | |             let response = embassy_time::with_timeout(
...   |
154 | |             cmd.parse((&response).into())
155 | |         }
    | |_________^
    |
    = help: remove the `!` and swap the blocks of the `if`/`else`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else

Check warning on line 141 in atat/src/asynch/simple_client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> atat/src/asynch/simple_client.rs:141:29
    |
141 |         let len = cmd.write(&mut self.buf);
    |                             ^^^^^^^^^^^^^ help: change this to: `self.buf`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 134 in atat/src/asynch/simple_client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

consider adding a `;` to the last statement for consistent formatting

warning: consider adding a `;` to the last statement for consistent formatting
   --> atat/src/asynch/simple_client.rs:134:13
    |
134 |             cooldown.await
    |             ^^^^^^^^^^^^^^ help: add a `;` here: `cooldown.await;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned

Check warning on line 88 in atat/src/asynch/simple_client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

consider adding a `;` to the last statement for consistent formatting

warning: consider adding a `;` to the last statement for consistent formatting
  --> atat/src/asynch/simple_client.rs:88:37
   |
88 | ...                   debug!("Received OK ({}/{})", swallowed, self.pos)
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `debug!("Received OK ({}/{})", swallowed, self.pos);`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned

Check warning on line 125 in atat/src/asynch/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary boolean `not` operation

warning: unnecessary boolean `not` operation
   --> atat/src/asynch/client.rs:117:9
    |
117 | /         if !Cmd::EXPECTS_RESPONSE_CODE {
118 | |             cmd.parse(Ok(&[]))
119 | |         } else {
120 | |             let response = self
...   |
124 | |             cmd.parse(response.into())
125 | |         }
    | |_________^
    |
    = help: remove the `!` and swap the blocks of the `if`/`else`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
    = note: `-W clippy::if-not-else` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::if_not_else)]`

Check warning on line 115 in atat/src/asynch/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> atat/src/asynch/client.rs:115:29
    |
115 |         let len = cmd.write(&mut self.buf);
    |                             ^^^^^^^^^^^^^ help: change this to: `self.buf`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `-W clippy::needless-borrow` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`

Check warning on line 108 in atat/src/asynch/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

consider adding a `;` to the last statement for consistent formatting

warning: consider adding a `;` to the last statement for consistent formatting
   --> atat/src/asynch/client.rs:108:13
    |
108 |             cooldown.await
    |             ^^^^^^^^^^^^^^ help: add a `;` here: `cooldown.await;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned

Check warning on line 90 in atat/src/asynch/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
  --> atat/src/asynch/client.rs:90:32
   |
90 |                 Either::Right((_, fut)) => {
   |                                ^ help: use `()` instead of `_`: `()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns

Check warning on line 24 in atat/src/urc_channel.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
  --> atat/src/urc_channel.rs:24:5
   |
24 |     pub const fn new() -> Self {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub const fn new() -> Self`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 114 in atat/src/traits.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

warning: matching over `()` is more explicit
   --> atat/src/traits.rs:114:48
    |
114 |         String::try_from(utf8_string).map_err(|_| Error::Parse)
    |                                                ^ help: use `()` instead of `_`: `()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns

Check warning on line 44 in atat/src/response_slot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function which may panic missing `# Panics` section

warning: docs for function which may panic missing `# Panics` section
  --> atat/src/response_slot.rs:44:5
   |
44 |     pub fn try_get<'a>(&'a self) -> Option<ResponseSlotGuard<'a, N>> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: first possible panic found here
  --> atat/src/response_slot.rs:47:18
   |
47 |             Some(self.0.try_lock().unwrap())
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc

Check warning on line 44 in atat/src/response_slot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
  --> atat/src/response_slot.rs:44:20
   |
44 |     pub fn try_get<'a>(&'a self) -> Option<ResponseSlotGuard<'a, N>> {
   |                    ^^   ^^                                   ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
44 -     pub fn try_get<'a>(&'a self) -> Option<ResponseSlotGuard<'a, N>> {
44 +     pub fn try_get(&self) -> Option<ResponseSlotGuard<'_, N>> {
   |

Check warning on line 36 in atat/src/response_slot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function which may panic missing `# Panics` section

warning: docs for function which may panic missing `# Panics` section
  --> atat/src/response_slot.rs:36:5
   |
36 |     pub async fn get<'a>(&'a self) -> ResponseSlotGuard<'a, N> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: first possible panic found here
  --> atat/src/response_slot.rs:40:9
   |
40 |         self.0.try_lock().unwrap()
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc

Check warning on line 36 in atat/src/response_slot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
  --> atat/src/response_slot.rs:36:22
   |
36 |     pub async fn get<'a>(&'a self) -> ResponseSlotGuard<'a, N> {
   |                      ^^   ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `-W clippy::needless-lifetimes` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]`

Check warning on line 23 in atat/src/response_slot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
  --> atat/src/response_slot.rs:23:5
   |
23 |     pub const fn new() -> Self {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub const fn new() -> Self`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 75 in atat/src/response.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
  --> atat/src/response.rs:75:57
   |
75 |                 Err(InternalError::ConnectionError((*e).try_into().unwrap()))
   |                                                         ^^^^^^^^^^^^^^^^^^^ help: use: `into()`
   |
   = note: converting `u8` to `ConnectionError` cannot fail
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions

Check warning on line 73 in atat/src/response.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
  --> atat/src/response.rs:73:71
   |
73 |             Response::CmsError(e) => Err(InternalError::CmsError((*e).try_into().unwrap())),
   |                                                                       ^^^^^^^^^^^^^^^^^^^ help: use: `into()`
   |
   = note: converting `u16` to `CmsError` cannot fail
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions

Check warning on line 72 in atat/src/response.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
  --> atat/src/response.rs:72:71
   |
72 |             Response::CmeError(e) => Err(InternalError::CmeError((*e).try_into().unwrap())),
   |                                                                       ^^^^^^^^^^^^^^^^^^^ help: use: `into()`
   |
   = note: converting `u16` to `CmeError` cannot fail
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
   = note: `-W clippy::unnecessary-fallible-conversions` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_fallible_conversions)]`

Check warning on line 22 in atat/src/response.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function which may panic missing `# Panics` section

warning: docs for function which may panic missing `# Panics` section
  --> atat/src/response.rs:22:5
   |
22 |     pub fn ok(value: &[u8]) -> Self {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: first possible panic found here
  --> atat/src/response.rs:23:22
   |
23 |         Response::Ok(Vec::from_slice(value).unwrap())
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc

Check warning on line 22 in atat/src/response.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
  --> atat/src/response.rs:22:5
   |
22 |     pub fn ok(value: &[u8]) -> Self {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn ok(value: &[u8]) -> Self`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 4 in atat/src/response.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you are deriving `PartialEq` and can implement `Eq`

warning: you are deriving `PartialEq` and can implement `Eq`
 --> atat/src/response.rs:4:24
  |
4 | #[derive(Debug, Clone, PartialEq)]
  |                        ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq