Skip to content

Bump embedded-hal to rc.1 #189

Bump embedded-hal to rc.1

Bump embedded-hal to rc.1 #189

GitHub Actions / clippy succeeded Aug 29, 2023 in 8s

clippy

391 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 391
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 100 in ublox-short-range/src/wifi/mod.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
   --> ublox-short-range/src/wifi/mod.rs:100:5
    |
100 |     pub fn socket_to_peer(&self, socket_handle: &SocketHandle) -> Option<&PeerHandle> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn socket_to_peer(&self, socket_handle: &SocketHandle) -> Option<&PeerHandle>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 96 in ublox-short-range/src/wifi/mod.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
  --> ublox-short-range/src/wifi/mod.rs:96:5
   |
96 |     pub fn peer_to_socket(&self, peer: &PeerHandle) -> Option<&SocketHandle> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn peer_to_socket(&self, peer: &PeerHandle) -> Option<&SocketHandle>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 83 in ublox-short-range/src/wifi/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
  --> ublox-short-range/src/wifi/mod.rs:79:5
   |
79 | /     pub fn insert_peer(
80 | |         &mut self,
81 | |         peer: PeerHandle,
82 | |         socket_handle: SocketHandle,
83 | |     ) -> Result<(), SocketMapError> {
   | |___________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 73 in ublox-short-range/src/wifi/mod.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
  --> ublox-short-range/src/wifi/mod.rs:73:5
   |
73 |     pub fn socket_to_channel_id(&self, socket_handle: &SocketHandle) -> Option<&ChannelId> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn socket_to_channel_id(&self, socket_handle: &SocketHandle) -> Option<&ChannelId>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 69 in ublox-short-range/src/wifi/mod.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
  --> ublox-short-range/src/wifi/mod.rs:69:5
   |
69 |     pub fn channel_to_socket(&self, channel_id: &ChannelId) -> Option<&SocketHandle> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn channel_to_socket(&self, channel_id: &ChannelId) -> Option<&SocketHandle>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 56 in ublox-short-range/src/wifi/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
  --> ublox-short-range/src/wifi/mod.rs:52:5
   |
52 | /     pub fn insert_channel(
53 | |         &mut self,
54 | |         channel_id: ChannelId,
55 | |         socket_handle: SocketHandle,
56 | |     ) -> Result<(), SocketMapError> {
   | |___________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 221 in ublox-short-range/src/wifi/tcp_stack.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
   --> ublox-short-range/src/wifi/tcp_stack.rs:221:33
    |
221 | ...                   ()
    |                       ^^ help: add a `;` here: `();`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned

Check warning on line 235 in ublox-short-range/src/wifi/tcp_stack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary boolean `not` operation

warning: unnecessary boolean `not` operation
   --> ublox-short-range/src/wifi/tcp_stack.rs:213:17
    |
213 | /                 if !matches!(
214 | |                     tcp.state(),
215 | |                     TcpState::ShutdownForWrite(_) | TcpState::Created
216 | |                 ) {
...   |
234 | |                     sockets.remove(socket)?;
235 | |                 }
    | |_________________^
    |
    = 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 10 in ublox-short-range/src/wifi/tcp_stack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

item in documentation is missing backticks

warning: item in documentation is missing backticks
  --> ublox-short-range/src/wifi/tcp_stack.rs:10:32
   |
10 | /// implements TCP and UDP for WiFi client
   |                                ^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
   |
10 | /// implements TCP and UDP for `WiFi` client
   |                                ~~~~~~

Check warning on line 3 in ublox-short-range/src/wifi/tcp_stack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of wildcard import

warning: usage of wildcard import
 --> ublox-short-range/src/wifi/tcp_stack.rs:3:5
  |
3 |     command::data_mode::*,
  |     ^^^^^^^^^^^^^^^^^^^^^ help: try: `command::data_mode::{ClosePeerConnection, ConnectPeer}`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports

Check warning on line 293 in ublox-short-range/src/wifi/udp_stack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

item in documentation is missing backticks

warning: item in documentation is missing backticks
   --> ublox-short-range/src/wifi/udp_stack.rs:293:30
    |
293 | /// - The driver has to call send_to after reciving data, to release the socket bound by remote host,
    |                              ^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
    |
293 | /// - The driver has to call `send_to` after reciving data, to release the socket bound by remote host,
    |                              ~~~~~~~~~

Check warning on line 292 in ublox-short-range/src/wifi/udp_stack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

item in documentation is missing backticks

warning: item in documentation is missing backticks
   --> ublox-short-range/src/wifi/udp_stack.rs:292:32
    |
292 | /// - The driver can only call send_to once after reciving data once.
    |                                ^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
    |
292 | /// - The driver can only call `send_to` once after reciving data once.
    |                                ~~~~~~~~~

Check warning on line 3 in ublox-short-range/src/wifi/udp_stack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of wildcard import

warning: usage of wildcard import
 --> ublox-short-range/src/wifi/udp_stack.rs:3:5
  |
3 |     command::data_mode::*,
  |     ^^^^^^^^^^^^^^^^^^^^^ help: try: `command::data_mode::{ClosePeerConnection, ConnectPeer, ServerConfiguration}`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports

Check warning on line 72 in ublox-short-range/src/wifi/peer_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
  --> ublox-short-range/src/wifi/peer_builder.rs:72:26
   |
72 |                 .map(|v| write!(&mut s, "privKey={}&", v).ok());
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
72 -                 .map(|v| write!(&mut s, "privKey={}&", v).ok());
72 +                 .map(|v| write!(&mut s, "privKey={v}&").ok());
   |

Check warning on line 68 in ublox-short-range/src/wifi/peer_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
  --> ublox-short-range/src/wifi/peer_builder.rs:68:26
   |
68 |                 .map(|v| write!(&mut s, "cert={}&", v).ok());
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
68 -                 .map(|v| write!(&mut s, "cert={}&", v).ok());
68 +                 .map(|v| write!(&mut s, "cert={v}&").ok());
   |

Check warning on line 64 in ublox-short-range/src/wifi/peer_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
  --> ublox-short-range/src/wifi/peer_builder.rs:64:26
   |
64 |                 .map(|v| write!(&mut s, "ca={}&", v).ok());
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
64 -                 .map(|v| write!(&mut s, "ca={}&", v).ok());
64 +                 .map(|v| write!(&mut s, "ca={v}&").ok());
   |

Check warning on line 58 in ublox-short-range/src/wifi/peer_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
  --> ublox-short-range/src/wifi/peer_builder.rs:58:22
   |
58 |             .map(|v| write!(&mut s, "local_port={}&", v).ok());
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
58 -             .map(|v| write!(&mut s, "local_port={}&", v).ok());
58 +             .map(|v| write!(&mut s, "local_port={v}&").ok());
   |

Check warning on line 43 in ublox-short-range/src/wifi/peer_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
  --> ublox-short-range/src/wifi/peer_builder.rs:43:22
   |
43 |             .map(|v| write!(&mut s, "local_port={}&", v).ok());
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
43 -             .map(|v| write!(&mut s, "local_port={}&", v).ok());
43 +             .map(|v| write!(&mut s, "local_port={v}&").ok());
   |

Check warning on line 30 in ublox-short-range/src/wifi/peer_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
  --> ublox-short-range/src/wifi/peer_builder.rs:30:30
   |
30 |             .and_then(|host| write!(s, "{}:{}/", host, port).ok());
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
   = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic`
help: change this to
   |
30 -             .and_then(|host| write!(s, "{}:{}/", host, port).ok());
30 +             .and_then(|host| write!(s, "{host}:{port}/").ok());
   |

Check warning on line 4 in ublox-short-range/src/wifi/peer_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

item in documentation is missing backticks

warning: item in documentation is missing backticks
 --> ublox-short-range/src/wifi/peer_builder.rs:4:32
  |
4 | /// implements TCP and UDP for WiFi client
  |                                ^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
  |
4 | /// implements TCP and UDP for `WiFi` client
  |                                ~~~~~~

Check warning on line 18 in ublox-short-range/src/wifi/tls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
  --> ublox-short-range/src/wifi/tls.rs:13:5
   |
13 | /     fn import_private_key(
14 | |         &mut self,
15 | |         name: &str,
16 | |         private_key: &[u8],
17 | |         password: Option<&str>,
18 | |     ) -> Result<(), Error>;
   | |___________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 12 in ublox-short-range/src/wifi/tls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
  --> ublox-short-range/src/wifi/tls.rs:12:5
   |
12 |     fn import_root_ca(&mut self, name: &str, root_ca: &[u8]) -> Result<(), Error>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 11 in ublox-short-range/src/wifi/tls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
  --> ublox-short-range/src/wifi/tls.rs:11:5
   |
11 |     fn import_certificate(&mut self, name: &str, certificate: &[u8]) -> Result<(), Error>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 3 in ublox-short-range/src/wifi/tls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of wildcard import

warning: usage of wildcard import
 --> ublox-short-range/src/wifi/tls.rs:3:35
  |
3 |     command::security::{types::*, *},
  |                                   ^ help: try: `PrepareSecurityDataImport, SendSecurityDataImport`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports

Check warning on line 3 in ublox-short-range/src/wifi/tls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of wildcard import

warning: usage of wildcard import
 --> ublox-short-range/src/wifi/tls.rs:3:25
  |
3 |     command::security::{types::*, *},
  |                         ^^^^^^^^ help: try: `types::SecurityDataType`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports