Skip to content

TCP peer connect using domain name instead of ip.

Sign in for the full log view
GitHub Actions / clippy succeeded Aug 14, 2023 in 8s

clippy

429 warnings

Details

Results

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

Versions

  • rustc 1.71.1 (eb26296b5 2023-08-03)
  • cargo 1.71.1 (7f1d04c00 2023-07-29)
  • clippy 0.1.71 (eb26296 2023-08-03)

Annotations

Check warning on line 90 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:90:5
   |
90 |     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 86 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:86:5
   |
86 |     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 80 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:80:5
   |
80 |     pub fn remove_peer(&mut self, peer: &PeerHandle) -> Result<(), ()> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this returns a `Result<_, ()>`

warning: this returns a `Result<_, ()>`
  --> ublox-short-range/src/wifi/mod.rs:80:5
   |
80 |     pub fn remove_peer(&mut self, peer: &PeerHandle) -> Result<(), ()> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: use a custom `Error` type instead
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err

Check warning on line 74 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:74:5
   |
74 |     pub fn insert_peer(&mut self, peer: PeerHandle, socket_handle: SocketHandle) -> Result<(), ()> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this returns a `Result<_, ()>`

warning: this returns a `Result<_, ()>`
  --> ublox-short-range/src/wifi/mod.rs:74:5
   |
74 |     pub fn insert_peer(&mut self, peer: PeerHandle, socket_handle: SocketHandle) -> Result<(), ()> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: use a custom `Error` type instead
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err

Check warning on line 68 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:68:5
   |
68 |     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 64 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:64:5
   |
64 |     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 58 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:58:5
   |
58 |     pub fn remove_channel(&mut self, channel_id: &ChannelId) -> Result<(), ()> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this returns a `Result<_, ()>`

warning: this returns a `Result<_, ()>`
  --> ublox-short-range/src/wifi/mod.rs:58:5
   |
58 |     pub fn remove_channel(&mut self, channel_id: &ChannelId) -> Result<(), ()> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: use a custom `Error` type instead
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err

Check warning on line 50 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:46:5
   |
46 | /     pub fn insert_channel(
47 | |         &mut self,
48 | |         channel_id: ChannelId,
49 | |         socket_handle: SocketHandle,
50 | |     ) -> Result<(), ()> {
   | |_______________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this returns a `Result<_, ()>`

warning: this returns a `Result<_, ()>`
  --> ublox-short-range/src/wifi/mod.rs:46:5
   |
46 | /     pub fn insert_channel(
47 | |         &mut self,
48 | |         channel_id: ChannelId,
49 | |         socket_handle: SocketHandle,
50 | |     ) -> Result<(), ()> {
   | |_______________________^
   |
   = help: use a custom `Error` type instead
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
   = note: `-W clippy::result-unit-err` implied by `-W clippy::all`

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this could be a `const fn`

warning: this could be a `const fn`
  --> ublox-short-range/src/wifi/mod.rs:39:5
   |
39 | /     fn new() -> Self {
40 | |         Self {
41 | |             channel_map: heapless::FnvIndexMap::new(),
42 | |             peer_map: heapless::FnvIndexMap::new(),
43 | |         }
44 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn

Check warning on line 217 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:217:33
    |
217 | ...                   ()
    |                       ^^ 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 231 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:209:17
    |
209 | /                 if !matches!(
210 | |                     tcp.state(),
211 | |                     TcpState::ShutdownForWrite(_) | TcpState::Created
212 | |                 ) {
...   |
230 | |                     sockets.remove(socket)?;
231 | |                 }
    | |_________________^
    |
    = 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 154 in ublox-short-range/src/wifi/tcp_stack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `ublox_sockets::Error`

warning: useless conversion to the same type: `ublox_sockets::Error`
   --> ublox-short-range/src/wifi/tcp_stack.rs:154:47
    |
154 |                 .map_err(|e| nb::Error::Other(e.into()))?;
    |                                               ^^^^^^^^ help: consider removing `.into()`: `e`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

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 349 in ublox-short-range/src/wifi/udp_stack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

length comparison to zero

warning: length comparison to zero
   --> ublox-short-range/src/wifi/udp_stack.rs:349:20
    |
349 |                 if buffer.len() == 0 {
    |                    ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `buffer.is_empty()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
    = note: `-W clippy::len-zero` implied by `-W clippy::all`

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 182 in ublox-short-range/src/wifi/udp_stack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `SocketAddr` which implements the `Copy` trait

warning: using `clone` on type `SocketAddr` which implements the `Copy` trait
   --> ublox-short-range/src/wifi/udp_stack.rs:182:28
    |
182 |                 Ok((bytes, remote.clone()))
    |                            ^^^^^^^^^^^^^^ help: try dereferencing it: `*remote`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

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

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `command::PeerHandle`

warning: useless conversion to the same type: `command::PeerHandle`
  --> ublox-short-range/src/wifi/udp_stack.rs:90:30
   |
90 |                 .insert_peer(resp.peer_handle.into(), *socket)
   |                              ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `resp.peer_handle`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
   = note: `-W clippy::useless-conversion` implied by `-W clippy::all`

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 71 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:71:26
   |
71 |                 .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
   |
71 -                 .map(|v| write!(&mut s, "privKey={}&", v).ok());
71 +                 .map(|v| write!(&mut s, "privKey={v}&").ok());
   |