cargo fmt #182
This workflow graph cannot be shown
A graph will be generated the next time this workflow is run.
Annotations
1 error and 429 warnings
Error
No event triggers defined in `on`
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/mod.rs#L90
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
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/mod.rs#L86
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
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/mod.rs#L80
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
|
this returns a `Result<_, ()>`:
ublox-short-range/src/wifi/mod.rs#L80
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
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/mod.rs#L74
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
|
this returns a `Result<_, ()>`:
ublox-short-range/src/wifi/mod.rs#L74
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
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/mod.rs#L68
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
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/mod.rs#L64
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
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/mod.rs#L58
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
|
this returns a `Result<_, ()>`:
ublox-short-range/src/wifi/mod.rs#L58
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
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/mod.rs#L46
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
|
this returns a `Result<_, ()>`:
ublox-short-range/src/wifi/mod.rs#L46
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`
|
this could be a `const fn`:
ublox-short-range/src/wifi/mod.rs#L39
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
|
consider adding a `;` to the last statement for consistent formatting:
ublox-short-range/src/wifi/tcp_stack.rs#L218
warning: consider adding a `;` to the last statement for consistent formatting
--> ublox-short-range/src/wifi/tcp_stack.rs:218:33
|
218 | ... ()
| ^^ help: add a `;` here: `();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
unnecessary boolean `not` operation:
ublox-short-range/src/wifi/tcp_stack.rs#L210
warning: unnecessary boolean `not` operation
--> ublox-short-range/src/wifi/tcp_stack.rs:210:17
|
210 | / if !matches!(
211 | | tcp.state(),
212 | | TcpState::ShutdownForWrite(_) | TcpState::Created
213 | | ) {
... |
231 | | sockets.remove(socket)?;
232 | | }
| |_________________^
|
= 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
|
useless conversion to the same type: `ublox_sockets::Error`:
ublox-short-range/src/wifi/tcp_stack.rs#L155
warning: useless conversion to the same type: `ublox_sockets::Error`
--> ublox-short-range/src/wifi/tcp_stack.rs:155:47
|
155 | .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
|
item in documentation is missing backticks:
ublox-short-range/src/wifi/tcp_stack.rs#L10
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
| ~~~~~~
|
usage of wildcard import:
ublox-short-range/src/wifi/tcp_stack.rs#L3
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
|
length comparison to zero:
ublox-short-range/src/wifi/udp_stack.rs#L349
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`
|
item in documentation is missing backticks:
ublox-short-range/src/wifi/udp_stack.rs#L293
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,
| ~~~~~~~~~
|
item in documentation is missing backticks:
ublox-short-range/src/wifi/udp_stack.rs#L292
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.
| ~~~~~~~~~
|
using `clone` on type `SocketAddr` which implements the `Copy` trait:
ublox-short-range/src/wifi/udp_stack.rs#L182
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
|
useless conversion to the same type: `command::PeerHandle`:
ublox-short-range/src/wifi/udp_stack.rs#L90
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`
|
usage of wildcard import:
ublox-short-range/src/wifi/udp_stack.rs#L3
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
|
variables can be used directly in the `format!` string:
ublox-short-range/src/wifi/peer_builder.rs#L71
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());
|
|
variables can be used directly in the `format!` string:
ublox-short-range/src/wifi/peer_builder.rs#L67
warning: variables can be used directly in the `format!` string
--> ublox-short-range/src/wifi/peer_builder.rs:67:26
|
67 | .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
|
67 - .map(|v| write!(&mut s, "cert={}&", v).ok());
67 + .map(|v| write!(&mut s, "cert={v}&").ok());
|
|
variables can be used directly in the `format!` string:
ublox-short-range/src/wifi/peer_builder.rs#L63
warning: variables can be used directly in the `format!` string
--> ublox-short-range/src/wifi/peer_builder.rs:63:26
|
63 | .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
|
63 - .map(|v| write!(&mut s, "ca={}&", v).ok());
63 + .map(|v| write!(&mut s, "ca={v}&").ok());
|
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
ublox-short-range/src/wifi/peer_builder.rs#L59
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> ublox-short-range/src/wifi/peer_builder.rs:59:9
|
59 | // self.creds.as_ref().map(|creds| {
60 | || creds
61 | || .ca_cert_name
62 | || .as_ref()
... ||
71 | || .map(|v| write!(&mut s, "privKey={}&", v).ok());
72 | || });
| ||__________^- help: try this: `if let Some(creds) = self.creds.as_ref() { ... }`
| |__________|
|
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
= note: `-W clippy::option-map-unit-fn` implied by `-W clippy::all`
|
variables can be used directly in the `format!` string:
ublox-short-range/src/wifi/peer_builder.rs#L58
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());
|
|
variables can be used directly in the `format!` string:
ublox-short-range/src/wifi/peer_builder.rs#L43
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());
|
|
variables can be used directly in the `format!` string:
ublox-short-range/src/wifi/peer_builder.rs#L30
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());
|
|
item in documentation is missing backticks:
ublox-short-range/src/wifi/peer_builder.rs#L4
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
| ~~~~~~
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/tls.rs#L13
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
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/tls.rs#L12
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
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/tls.rs#L11
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
|
usage of wildcard import:
ublox-short-range/src/wifi/tls.rs#L3
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
|
usage of wildcard import:
ublox-short-range/src/wifi/tls.rs#L3
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
|
using `clone` on type `Option<u8>` which implements the `Copy` trait:
ublox-short-range/src/wifi/supplicant.rs#L570
warning: using `clone` on type `Option<u8>` which implements the `Copy` trait
--> ublox-short-range/src/wifi/supplicant.rs:570:42
|
570 | if let Some(active_on_startup) = self.active_on_startup.clone() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.active_on_startup`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/supplicant.rs#L567
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/supplicant.rs:567:5
|
567 | pub fn unset_active_on_startup(&mut self) -> Result<(), WifiConnectionError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/supplicant.rs#L516
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/supplicant.rs:516:5
|
516 | pub fn set_active_on_startup(&mut self, config_id: u8) -> Result<(), WifiConnectionError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
unneeded `return` statement:
ublox-short-range/src/wifi/supplicant.rs#L510
warning: unneeded `return` statement
--> ublox-short-range/src/wifi/supplicant.rs:510:9
|
510 | return self.active_on_startup.is_some();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/supplicant.rs#L509
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/supplicant.rs:509:5
|
509 | pub fn has_active_on_startup(&self) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn has_active_on_startup(&self) -> bool`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
using `clone` on type `Option<u8>` which implements the `Copy` trait:
ublox-short-range/src/wifi/supplicant.rs#L505
warning: using `clone` on type `Option<u8>` which implements the `Copy` trait
--> ublox-short-range/src/wifi/supplicant.rs:505:16
|
505 | return self.active_on_startup.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.active_on_startup`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `-W clippy::clone-on-copy` implied by `-W clippy::all`
|
unneeded `return` statement:
ublox-short-range/src/wifi/supplicant.rs#L505
warning: unneeded `return` statement
--> ublox-short-range/src/wifi/supplicant.rs:505:9
|
505 | return self.active_on_startup.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `-W clippy::needless-return` implied by `-W clippy::all`
= help: remove `return`
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/supplicant.rs#L500
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/supplicant.rs:500:5
|
500 | pub fn get_active_on_startup(&self) -> Option<u8> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn get_active_on_startup(&self) -> Option<u8>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/supplicant.rs#L495
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/supplicant.rs:495:5
|
495 | pub fn flush(&mut self) -> Result<(), WifiConnectionError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function which may panic missing `# Panics` section:
ublox-short-range/src/wifi/supplicant.rs#L495
warning: docs for function which may panic missing `# Panics` section
--> ublox-short-range/src/wifi/supplicant.rs:495:5
|
495 | pub fn flush(&mut self) -> Result<(), WifiConnectionError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> ublox-short-range/src/wifi/supplicant.rs:496:9
|
496 | todo!()
| ^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/supplicant.rs#L477
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/supplicant.rs:477:5
|
477 | pub fn scan(&mut self) -> Result<Vec<WifiNetwork, 32>, WifiError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/supplicant.rs#L453
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/supplicant.rs:453:5
|
453 | pub fn deactivate(&mut self, config_id: u8) -> Result<(), WifiConnectionError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/supplicant.rs#L412
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/supplicant.rs:412:5
|
412 | pub fn activate(&mut self, config_id: u8) -> Result<(), WifiConnectionError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/supplicant.rs#L307
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/supplicant.rs:307:5
|
307 | / pub fn insert_connection(
308 | | &mut self,
309 | | config_id: u8,
310 | | options: &ConnectionOptions,
311 | | ) -> Result<(), WifiConnectionError> {
| |________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/supplicant.rs#L277
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/supplicant.rs:277:5
|
277 | pub fn remove_connection(&mut self, config_id: u8) -> Result<(), WifiConnectionError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
casting `usize` to `u8` may truncate the value:
ublox-short-range/src/wifi/supplicant.rs#L265
warning: casting `usize` to `u8` may truncate the value
--> ublox-short-range/src/wifi/supplicant.rs:265:16
|
265 | Ok((0..N as u8)
| ^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
265 | Ok((0..u8::try_from(N))
| ~~~~~~~~~~~~~~~
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/supplicant.rs#L263
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/supplicant.rs:263:5
|
263 | pub fn list_connections(&mut self) -> Result<Vec<(u8, ConnectionOptions), N>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function which may panic missing `# Panics` section:
ublox-short-range/src/wifi/supplicant.rs#L263
warning: docs for function which may panic missing `# Panics` section
--> ublox-short-range/src/wifi/supplicant.rs:263:5
|
263 | pub fn list_connections(&mut self) -> Result<Vec<(u8, ConnectionOptions), N>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> ublox-short-range/src/wifi/supplicant.rs:267:17
|
267 | / self.get_connection(config_id)
268 | | .unwrap()
| |_____________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/supplicant.rs#L251
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/supplicant.rs:251:5
|
251 | pub fn has_active_config_id(&self) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn has_active_config_id(&self) -> bool`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/supplicant.rs#L239
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/supplicant.rs:239:5
|
239 | pub fn get_active_config_id(&self) -> Option<u8> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn get_active_config_id(&self) -> Option<u8>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
this pattern matching can be expressed using equality:
ublox-short-range/src/wifi/supplicant.rs#L203
warning: this pattern matching can be expressed using equality
--> ublox-short-range/src/wifi/supplicant.rs:203:12
|
203 | if let WifiStationConfigR::IPv4Mode(IPv4Mode::Static) = ip_mode {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ip_mode == WifiStationConfigR::IPv4Mode(IPv4Mode::Static)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#equatable_if_let
= note: `-W clippy::equatable-if-let` implied by `-W clippy::nursery`
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/supplicant.rs#L161
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/supplicant.rs:161:5
|
161 | pub fn get_connection(&mut self, config_id: u8) -> Result<Option<ConnectionOptions>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
binary comparison to literal `Option::None`:
ublox-short-range/src/wifi/supplicant.rs#L99
warning: binary comparison to literal `Option::None`
--> ublox-short-range/src/wifi/supplicant.rs:99:20
|
99 | if *self.active_on_startup == None || *self.active_on_startup == Some(config_id) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.active_on_startup.is_none()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none
= note: `-W clippy::partialeq-to-none` implied by `-W clippy::all`
|
casting `usize` to `u8` may truncate the value:
ublox-short-range/src/wifi/supplicant.rs#L85
warning: casting `usize` to `u8` may truncate the value
--> ublox-short-range/src/wifi/supplicant.rs:85:29
|
85 | for config_id in 0..N as u8 {
| ^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
85 | for config_id in 0..u8::try_from(N) {
| ~~~~~~~~~~~~~~~
|
use Option::map_or_else instead of an if let/else:
ublox-short-range/src/wifi/options.rs#L129
warning: use Option::map_or_else instead of an if let/else
--> ublox-short-range/src/wifi/options.rs:129:19
|
129 | self.ip = if let Some(ip) = self.ip {
| ___________________^
130 | | Some(ip)
131 | | } else {
132 | | Some(Ipv4Addr::new(192, 168, 2, 1))
133 | | };
| |_________^ help: try: `self.ip.map_or_else(|| Some(Ipv4Addr::new(192, 168, 2, 1)), |ip| Some(ip))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
|
use Option::map_or_else instead of an if let/else:
ublox-short-range/src/wifi/options.rs#L123
warning: use Option::map_or_else instead of an if let/else
--> ublox-short-range/src/wifi/options.rs:123:23
|
123 | self.subnet = if let Some(subnet) = self.subnet {
| _______________________^
124 | | Some(subnet)
125 | | } else {
126 | | Some(Ipv4Addr::new(255, 255, 255, 0))
127 | | };
| |_________^ help: try: `self.subnet.map_or_else(|| Some(Ipv4Addr::new(255, 255, 255, 0)), |subnet| Some(subnet))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/wifi/options.rs#L120
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/wifi/options.rs:120:5
|
120 | / pub fn gateway_address(mut self, gateway_addr: Ipv4Addr) -> Self {
121 | | self.gateway = Some(gateway_addr);
122 | |
123 | | self.subnet = if let Some(subnet) = self.subnet {
... |
134 | | self
135 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
|
this could be a `const fn`:
ublox-short-range/src/wifi/options.rs#L120
warning: this could be a `const fn`
--> ublox-short-range/src/wifi/options.rs:120:5
|
120 | / pub fn gateway_address(mut self, gateway_addr: Ipv4Addr) -> Self {
121 | | self.gateway = Some(gateway_addr);
122 | |
123 | | self.subnet = if let Some(subnet) = self.subnet {
... |
134 | | self
135 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/options.rs#L120
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/options.rs:120:5
|
120 | pub fn gateway_address(mut self, gateway_addr: Ipv4Addr) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn gateway_address(mut self, gateway_addr: Ipv4Addr) -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
use Option::map_or_else instead of an if let/else:
ublox-short-range/src/wifi/options.rs#L111
warning: use Option::map_or_else instead of an if let/else
--> ublox-short-range/src/wifi/options.rs:111:24
|
111 | self.gateway = if let Some(gateway) = self.gateway {
| ________________________^
112 | | Some(gateway)
113 | | } else {
114 | | Some(Ipv4Addr::new(192, 168, 2, 1))
115 | | };
| |_________^ help: try: `self.gateway.map_or_else(|| Some(Ipv4Addr::new(192, 168, 2, 1)), |gateway| Some(gateway))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
|
use Option::map_or_else instead of an if let/else:
ublox-short-range/src/wifi/options.rs#L105
warning: use Option::map_or_else instead of an if let/else
--> ublox-short-range/src/wifi/options.rs:105:19
|
105 | self.ip = if let Some(ip) = self.ip {
| ___________________^
106 | | Some(ip)
107 | | } else {
108 | | Some(Ipv4Addr::new(192, 168, 2, 1))
109 | | };
| |_________^ help: try: `self.ip.map_or_else(|| Some(Ipv4Addr::new(192, 168, 2, 1)), |ip| Some(ip))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/wifi/options.rs#L102
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/wifi/options.rs:102:5
|
102 | / pub fn subnet_address(mut self, subnet_addr: Ipv4Addr) -> Self {
103 | | self.subnet = Some(subnet_addr);
104 | |
105 | | self.ip = if let Some(ip) = self.ip {
... |
117 | | self
118 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
|
this could be a `const fn`:
ublox-short-range/src/wifi/options.rs#L102
warning: this could be a `const fn`
--> ublox-short-range/src/wifi/options.rs:102:5
|
102 | / pub fn subnet_address(mut self, subnet_addr: Ipv4Addr) -> Self {
103 | | self.subnet = Some(subnet_addr);
104 | |
105 | | self.ip = if let Some(ip) = self.ip {
... |
117 | | self
118 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/options.rs#L102
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/options.rs:102:5
|
102 | pub fn subnet_address(mut self, subnet_addr: Ipv4Addr) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn subnet_address(mut self, subnet_addr: Ipv4Addr) -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
use Option::map_or_else instead of an if let/else:
ublox-short-range/src/wifi/options.rs#L94
warning: use Option::map_or_else instead of an if let/else
--> ublox-short-range/src/wifi/options.rs:94:24
|
94 | self.gateway = if let Some(gateway) = self.gateway {
| ________________________^
95 | | Some(gateway)
96 | | } else {
97 | | Some(Ipv4Addr::new(192, 168, 2, 1))
98 | | };
| |_________^ help: try: `self.gateway.map_or_else(|| Some(Ipv4Addr::new(192, 168, 2, 1)), |gateway| Some(gateway))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
|
use Option::map_or_else instead of an if let/else:
ublox-short-range/src/wifi/options.rs#L88
warning: use Option::map_or_else instead of an if let/else
--> ublox-short-range/src/wifi/options.rs:88:23
|
88 | self.subnet = if let Some(subnet) = self.subnet {
| _______________________^
89 | | Some(subnet)
90 | | } else {
91 | | Some(Ipv4Addr::new(255, 255, 255, 0))
92 | | };
| |_________^ help: try: `self.subnet.map_or_else(|| Some(Ipv4Addr::new(255, 255, 255, 0)), |subnet| Some(subnet))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/wifi/options.rs#L86
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/wifi/options.rs:86:5
|
86 | / pub fn ip_address(mut self, ip_addr: Ipv4Addr) -> Self {
87 | | self.ip = Some(ip_addr);
88 | | self.subnet = if let Some(subnet) = self.subnet {
89 | | Some(subnet)
... |
99 | | self
100 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
|
this could be a `const fn`:
ublox-short-range/src/wifi/options.rs#L86
warning: this could be a `const fn`
--> ublox-short-range/src/wifi/options.rs:86:5
|
86 | / pub fn ip_address(mut self, ip_addr: Ipv4Addr) -> Self {
87 | | self.ip = Some(ip_addr);
88 | | self.subnet = if let Some(subnet) = self.subnet {
89 | | Some(subnet)
... |
99 | | self
100 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/options.rs#L86
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/options.rs:86:5
|
86 | pub fn ip_address(mut self, ip_addr: Ipv4Addr) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn ip_address(mut self, ip_addr: Ipv4Addr) -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/wifi/options.rs#L81
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/wifi/options.rs:81:5
|
81 | / pub fn password(mut self, password: String<64>) -> Self {
82 | | self.password = Some(password);
83 | | self
84 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
|
this could be a `const fn`:
ublox-short-range/src/wifi/options.rs#L81
warning: this could be a `const fn`
--> ublox-short-range/src/wifi/options.rs:81:5
|
81 | / pub fn password(mut self, password: String<64>) -> Self {
82 | | self.password = Some(password);
83 | | self
84 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/options.rs#L81
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/options.rs:81:5
|
81 | pub fn password(mut self, password: String<64>) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn password(mut self, password: String<64>) -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/wifi/options.rs#L76
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/wifi/options.rs:76:5
|
76 | / pub fn ssid(mut self, ssid: String<64>) -> Self {
77 | | self.ssid = ssid;
78 | | self
79 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
|
this could be a `const fn`:
ublox-short-range/src/wifi/options.rs#L76
warning: this could be a `const fn`
--> ublox-short-range/src/wifi/options.rs:76:5
|
76 | / pub fn ssid(mut self, ssid: String<64>) -> Self {
77 | | self.ssid = ssid;
78 | | self
79 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/options.rs#L76
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/options.rs:76:5
|
76 | pub fn ssid(mut self, ssid: String<64>) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn ssid(mut self, ssid: String<64>) -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/options.rs#L72
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/options.rs:72:5
|
72 | pub fn new() -> Self {
| ^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new() -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
item name ends with its containing module's name:
ublox-short-range/src/wifi/options.rs#L59
warning: item name ends with its containing module's name
--> ublox-short-range/src/wifi/options.rs:59:12
|
59 | pub struct ConnectionOptions {
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/wifi/options.rs#L52
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/wifi/options.rs:52:5
|
52 | / pub fn band(mut self, band: Band) -> Self {
53 | | self.band = Some(band);
54 | | self
55 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
|
this could be a `const fn`:
ublox-short-range/src/wifi/options.rs#L52
warning: this could be a `const fn`
--> ublox-short-range/src/wifi/options.rs:52:5
|
52 | / pub fn band(mut self, band: Band) -> Self {
53 | | self.band = Some(band);
54 | | self
55 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/options.rs#L52
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/options.rs:52:5
|
52 | pub fn band(mut self, band: Band) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn band(mut self, band: Band) -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/wifi/options.rs#L47
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/wifi/options.rs:47:5
|
47 | / pub fn channel(mut self, channel: Channel) -> Self {
48 | | self.channel = Some(channel);
49 | | self
50 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
|
this could be a `const fn`:
ublox-short-range/src/wifi/options.rs#L47
warning: this could be a `const fn`
--> ublox-short-range/src/wifi/options.rs:47:5
|
47 | / pub fn channel(mut self, channel: Channel) -> Self {
48 | | self.channel = Some(channel);
49 | | self
50 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/options.rs#L47
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/options.rs:47:5
|
47 | pub fn channel(mut self, channel: Channel) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn channel(mut self, channel: Channel) -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
this could be a `const fn`:
ublox-short-range/src/wifi/options.rs#L40
warning: this could be a `const fn`
--> ublox-short-range/src/wifi/options.rs:40:5
|
40 | / pub fn new() -> Self {
41 | | Self {
42 | | channel: Some(Channel::One),
43 | | band: Some(Band::Bg),
44 | | }
45 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/options.rs#L40
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/options.rs:40:5
|
40 | pub fn new() -> Self {
| ^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new() -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
item name ends with its containing module's name:
ublox-short-range/src/wifi/options.rs#L34
warning: item name ends with its containing module's name
--> ublox-short-range/src/wifi/options.rs:34:12
|
34 | pub struct HotspotOptions {
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
unnecessary structure name repetition:
ublox-short-range/src/wifi/network.rs#L32
warning: unnecessary structure name repetition
--> ublox-short-range/src/wifi/network.rs:32:12
|
32 | Ok(WifiNetwork {
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
item name ends with its containing module's name:
ublox-short-range/src/wifi/network.rs#L16
warning: item name ends with its containing module's name
--> ublox-short-range/src/wifi/network.rs:16:12
|
16 | pub struct WifiNetwork {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/wifi/network.rs#L9
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/wifi/network.rs:9:10
|
9 | #[derive(PartialEq, Debug)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/wifi/dns.rs#L7
warning: usage of wildcard import
--> ublox-short-range/src/wifi/dns.rs:7:13
|
7 | use crate::{command::ping::*, UbloxClient};
| ^^^^^^^^^^^^^^^^ help: try: `command::ping::Ping`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
this could be a `const fn`:
ublox-short-range/src/wifi/connection.rs#L55
warning: this could be a `const fn`
--> ublox-short-range/src/wifi/connection.rs:55:5
|
55 | / pub(crate) fn activate(mut self) -> Self {
56 | | self.activated = true;
57 | | self
58 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/connection.rs#L51
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/connection.rs:51:5
|
51 | pub fn is_access_point(&self) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn is_access_point(&self) -> bool`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/wifi/connection.rs#L47
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/wifi/connection.rs:47:5
|
47 | pub fn is_station(&self) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn is_station(&self) -> bool`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
unnecessary structure name repetition:
ublox-short-range/src/wifi/connection.rs#L34
warning: unnecessary structure name repetition
--> ublox-short-range/src/wifi/connection.rs:34:9
|
34 | WifiConnection {
| ^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
this could be a `const fn`:
ublox-short-range/src/wifi/connection.rs#L33
warning: this could be a `const fn`
--> ublox-short-range/src/wifi/connection.rs:33:5
|
33 | / pub(crate) fn new(network: WifiNetwork, wifi_state: WiFiState, config_id: u8) -> Self {
34 | | WifiConnection {
35 | | wifi_state,
36 | | network_state: NetworkState::Unattached,
... |
40 | | }
41 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
item name ends with its containing module's name:
ublox-short-range/src/wifi/connection.rs#L21
warning: item name ends with its containing module's name
--> ublox-short-range/src/wifi/connection.rs:21:12
|
21 | pub struct WifiConnection {
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/wifi/connection.rs#L13
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/wifi/connection.rs:13:30
|
13 | #[derive(Debug, Clone, Copy, PartialEq, defmt::Format)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/wifi/connection.rs#L3
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/wifi/connection.rs:3:30
|
3 | #[derive(Debug, Clone, Copy, PartialEq, defmt::Format)]
| ^^^^^^^^^ 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
|
consider adding a `;` to the last statement for consistent formatting:
ublox-short-range/src/wifi/ap.rs#L224
warning: consider adding a `;` to the last statement for consistent formatting
--> ublox-short-range/src/wifi/ap.rs:224:13
|
224 | con.deactivate()
| ^^^^^^^^^^^^^^^^ help: add a `;` here: `con.deactivate();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/ap.rs#L207
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/ap.rs:207:5
|
207 | pub fn stop_hotspot(&mut self) -> Result<(), WifiHotspotError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
this argument is passed by value, but not consumed in the function body:
ublox-short-range/src/wifi/ap.rs#L37
warning: this argument is passed by value, but not consumed in the function body
--> ublox-short-range/src/wifi/ap.rs:37:24
|
37 | configuration: HotspotOptions,
| ^^^^^^^^^^^^^^ help: consider taking a reference instead: `&HotspotOptions`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic`
|
this function has too many lines (135/100):
ublox-short-range/src/wifi/ap.rs#L34
warning: this function has too many lines (135/100)
--> ublox-short-range/src/wifi/ap.rs:34:5
|
34 | / pub fn create_hotspot(
35 | | &mut self,
36 | | options: ConnectionOptions,
37 | | configuration: HotspotOptions,
... |
201 | | Ok(())
202 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/wifi/ap.rs#L34
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/wifi/ap.rs:34:5
|
34 | / pub fn create_hotspot(
35 | | &mut self,
36 | | options: ConnectionOptions,
37 | | configuration: HotspotOptions,
38 | | ) -> Result<(), WifiHotspotError> {
| |_____________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
unnecessary structure name repetition:
ublox-short-range/src/error.rs#L140
warning: unnecessary structure name repetition
--> ublox-short-range/src/error.rs:140:9
|
140 | WifiError::ATError(error)
| ^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/error.rs#L132
warning: unnecessary structure name repetition
--> ublox-short-range/src/error.rs:132:9
|
132 | WifiConnectionError::Other {
| ^^^^^^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/error.rs#L126
warning: unnecessary structure name repetition
--> ublox-short-range/src/error.rs:126:9
|
126 | WifiConnectionError::Other { kind: error }
| ^^^^^^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/error.rs#L118
warning: unnecessary structure name repetition
--> ublox-short-range/src/error.rs:118:9
|
118 | WifiHotspotError::Other {
| ^^^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/error.rs#L112
warning: unnecessary structure name repetition
--> ublox-short-range/src/error.rs:112:9
|
112 | WifiHotspotError::Other { kind: error }
| ^^^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/error.rs#L106
warning: unnecessary structure name repetition
--> ublox-short-range/src/error.rs:106:9
|
106 | WifiHotspotError::Internal(e)
| ^^^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
item name ends with its containing module's name:
ublox-short-range/src/error.rs#L91
warning: item name ends with its containing module's name
--> ublox-short-range/src/error.rs:91:10
|
91 | pub enum WifiHotspotError {
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
item name ends with its containing module's name:
ublox-short-range/src/error.rs#L75
warning: item name ends with its containing module's name
--> ublox-short-range/src/error.rs:75:10
|
75 | pub enum WifiError {
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
unnecessary structure name repetition:
ublox-short-range/src/error.rs#L70
warning: unnecessary structure name repetition
--> ublox-short-range/src/error.rs:70:9
|
70 | WifiConnectionError::Internal(e)
| ^^^^^^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
item name ends with its containing module's name:
ublox-short-range/src/error.rs#L49
warning: item name ends with its containing module's name
--> ublox-short-range/src/error.rs:49:10
|
49 | pub enum WifiConnectionError {
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
unnecessary structure name repetition:
ublox-short-range/src/error.rs#L43
warning: unnecessary structure name repetition
--> ublox-short-range/src/error.rs:43:9
|
43 | Error::Socket(e)
| ^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/error.rs#L37
warning: unnecessary structure name repetition
--> ublox-short-range/src/error.rs:37:9
|
37 | Error::AT(e)
| ^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
item name ends with its containing module's name:
ublox-short-range/src/error.rs#L1
warning: item name ends with its containing module's name
--> ublox-short-range/src/error.rs:1:33
|
1 | pub use ublox_sockets::Error as SocketError;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
unnecessary structure name repetition:
ublox-short-range/src/config.rs#L99
warning: unnecessary structure name repetition
--> ublox-short-range/src/config.rs:99:9
|
99 | Config {
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/config.rs#L97
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/config.rs:97:5
|
97 | / pub fn tls_out_buffer_size(self, bytes: u16) -> Self {
98 | | assert!(bytes > 512);
99 | | Config {
100 | | tls_out_buffer_size: Some(bytes),
101 | | ..self
102 | | }
103 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
|
docs for function which may panic missing `# Panics` section:
ublox-short-range/src/config.rs#L97
warning: docs for function which may panic missing `# Panics` section
--> ublox-short-range/src/config.rs:97:5
|
97 | pub fn tls_out_buffer_size(self, bytes: u16) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> ublox-short-range/src/config.rs:98:9
|
98 | assert!(bytes > 512);
| ^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
|
item in documentation is missing backticks:
ublox-short-range/src/config.rs#L96
warning: item in documentation is missing backticks
--> ublox-short-range/src/config.rs:96:9
|
96 | /// DEFAULT_TLS_OUT_BUFFER_SIZE (3072)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
96 | /// `DEFAULT_TLS_OUT_BUFFER_SIZE` (3072)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unnecessary structure name repetition:
ublox-short-range/src/config.rs#L86
warning: unnecessary structure name repetition
--> ublox-short-range/src/config.rs:86:9
|
86 | Config {
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/config.rs#L84
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/config.rs:84:5
|
84 | / pub fn tls_in_buffer_size(self, bytes: u16) -> Self {
85 | | assert!(bytes > 512);
86 | | Config {
87 | | tls_in_buffer_size: Some(bytes),
88 | | ..self
89 | | }
90 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
|
docs for function which may panic missing `# Panics` section:
ublox-short-range/src/config.rs#L84
warning: docs for function which may panic missing `# Panics` section
--> ublox-short-range/src/config.rs:84:5
|
84 | pub fn tls_in_buffer_size(self, bytes: u16) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> ublox-short-range/src/config.rs:85:9
|
85 | assert!(bytes > 512);
| ^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
= note: `-W clippy::missing-panics-doc` implied by `-W clippy::pedantic`
|
item in documentation is missing backticks:
ublox-short-range/src/config.rs#L83
warning: item in documentation is missing backticks
--> ublox-short-range/src/config.rs:83:9
|
83 | /// DEFAULT_TLS_IN_BUFFER_SIZE (7800)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
83 | /// `DEFAULT_TLS_IN_BUFFER_SIZE` (7800)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unnecessary structure name repetition:
ublox-short-range/src/config.rs#L73
warning: unnecessary structure name repetition
--> ublox-short-range/src/config.rs:73:9
|
73 | Config {
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/config.rs#L72
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/config.rs:72:5
|
72 | / pub fn max_urc_attempts(self, max_attempts: u8) -> Self {
73 | | Config {
74 | | max_urc_attempts: max_attempts,
75 | | ..self
76 | | }
77 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
|
this could be a `const fn`:
ublox-short-range/src/config.rs#L72
warning: this could be a `const fn`
--> ublox-short-range/src/config.rs:72:5
|
72 | / pub fn max_urc_attempts(self, max_attempts: u8) -> Self {
73 | | Config {
74 | | max_urc_attempts: max_attempts,
75 | | ..self
76 | | }
77 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
unnecessary structure name repetition:
ublox-short-range/src/config.rs#L66
warning: unnecessary structure name repetition
--> ublox-short-range/src/config.rs:66:9
|
66 | Config {
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/config.rs#L65
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/config.rs:65:5
|
65 | / pub fn with_hostname(self, hostname: &str) -> Self {
66 | | Config {
67 | | hostname: Some(String::from(hostname)),
68 | | ..self
69 | | }
70 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
|
unnecessary structure name repetition:
ublox-short-range/src/config.rs#L59
warning: unnecessary structure name repetition
--> ublox-short-range/src/config.rs:59:9
|
59 | Config {
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
missing `#[must_use]` attribute on a method returning `Self`:
ublox-short-range/src/config.rs#L58
warning: missing `#[must_use]` attribute on a method returning `Self`
--> ublox-short-range/src/config.rs:58:5
|
58 | / pub fn with_rst(self, rst_pin: RST) -> Self {
59 | | Config {
60 | | rst_pin: Some(rst_pin),
61 | | ..self
62 | | }
63 | | }
| |_____^
|
= help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
= note: `-W clippy::return-self-not-must-use` implied by `-W clippy::pedantic`
|
this could be a `const fn`:
ublox-short-range/src/config.rs#L58
warning: this could be a `const fn`
--> ublox-short-range/src/config.rs:58:5
|
58 | / pub fn with_rst(self, rst_pin: RST) -> Self {
59 | | Config {
60 | | rst_pin: Some(rst_pin),
61 | | ..self
62 | | }
63 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
unnecessary structure name repetition:
ublox-short-range/src/config.rs#L48
warning: unnecessary structure name repetition
--> ublox-short-range/src/config.rs:48:9
|
48 | Config {
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
this could be a `const fn`:
ublox-short-range/src/config.rs#L47
warning: this could be a `const fn`
--> ublox-short-range/src/config.rs:47:5
|
47 | / pub fn new() -> Self {
48 | | Config {
49 | | rst_pin: None,
50 | | hostname: None,
... |
55 | | }
56 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/config.rs#L47
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/config.rs:47:5
|
47 | pub fn new() -> Self {
| ^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new() -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
|
unnecessary structure name repetition:
ublox-short-range/src/config.rs#L32
warning: unnecessary structure name repetition
--> ublox-short-range/src/config.rs:32:9
|
32 | Config {
| ^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true:
ublox-short-range/src/command/mod.rs#L109
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> ublox-short-range/src/command/mod.rs:109:1
|
109 | impl Into<bool> for OnOff {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `-W clippy::from-over-into` implied by `-W clippy::all`
help: replace the `Into` implementation with `From<command::OnOff>`
|
109 ~ impl From<OnOff> for bool {
110 ~ fn from(val: OnOff) -> Self {
111 ~ match val {
112 ~ OnOff::On => true,
113 ~ OnOff::Off => false,
|
|
you seem to be trying to match on a boolean expression:
ublox-short-range/src/command/mod.rs#L102
warning: you seem to be trying to match on a boolean expression
--> ublox-short-range/src/command/mod.rs:102:9
|
102 | / match b {
103 | | true => Self::On,
104 | | false => Self::Off,
105 | | }
| |_________^ help: consider using an `if`/`else` expression: `if b { Self::On } else { Self::Off }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool
= note: `-W clippy::match-bool` implied by `-W clippy::pedantic`
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/mod.rs#L93
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/mod.rs:93:17
|
93 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/mod.rs#L19
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/mod.rs:19:34
|
19 | #[derive(Debug, Clone, AtatResp, 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
|
item name starts with its containing module's name:
ublox-short-range/src/command/wifi/mod.rs#L185
warning: item name starts with its containing module's name
--> ublox-short-range/src/command/wifi/mod.rs:185:12
|
185 | pub struct WifiAPStatus {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
item name starts with its containing module's name:
ublox-short-range/src/command/wifi/mod.rs#L173
warning: item name starts with its containing module's name
--> ublox-short-range/src/command/wifi/mod.rs:173:12
|
173 | pub struct WifiAPAction {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
item name starts with its containing module's name:
ublox-short-range/src/command/wifi/mod.rs#L63
warning: item name starts with its containing module's name
--> ublox-short-range/src/command/wifi/mod.rs:63:12
|
63 | pub struct WifiScan<'a> {
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
usage of wildcard import:
ublox-short-range/src/command/wifi/mod.rs#L9
warning: usage of wildcard import
--> ublox-short-range/src/command/wifi/mod.rs:9:5
|
9 | use types::*;
| ^^^^^^^^ help: try: `types::{AccessPointAction, AccessPointConfig, AccessPointConfigParameter, AccessPointId, AccessPointStatusId, StatusId, WatchdogSetting, WifiConfig, WifiConfigParameter, WifiStationAction, WifiStationConfig, WifiStationConfigParameter}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
usage of wildcard import:
ublox-short-range/src/command/wifi/mod.rs#L8
warning: usage of wildcard import
--> ublox-short-range/src/command/wifi/mod.rs:8:5
|
8 | use responses::*;
| ^^^^^^^^^^^^ help: try: `responses::{GetWifiStationConfigResponse, WiFiAPStationListResponse, WifiAPConfigResponse, WifiAPStatusResponse, WifiConfigResponse, WifiMacResponse, WifiScanResponse, WifiStatusResponse}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/urc.rs#L53
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/urc.rs:53:17
|
53 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/urc.rs#L44
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/urc.rs:44:17
|
44 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/urc.rs#L37
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/urc.rs:37:17
|
37 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/urc.rs#L30
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/urc.rs:30:17
|
30 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/urc.rs#L7
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/urc.rs:7:17
|
7 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/wifi/urc.rs#L2
warning: usage of wildcard import
--> ublox-short-range/src/command/wifi/urc.rs:2:5
|
2 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::DisconnectReason`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
item in documentation is missing backticks:
ublox-short-range/src/command/wifi/urc.rs#L1
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/wifi/urc.rs:1:31
|
1 | //! Unsolicited responses for WiFi Commands
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
1 | //! Unsolicited responses for `WiFi` Commands
| ~~~~~~
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1409
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1409:24
|
1409 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1403
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1403:17
|
1403 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1369
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1369:17
|
1369 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1349
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1349:17
|
1349 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1343
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1343:17
|
1343 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1335
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1335:17
|
1335 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1324
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1324:17
|
1324 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1318
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1318:17
|
1318 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1312
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1312:17
|
1312 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1305
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1305:17
|
1305 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1296
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1296:17
|
1296 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L1021
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:1021:17
|
1021 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L865
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:865:23
|
865 | #[derive(Clone, Copy, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L859
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:859:17
|
859 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L851
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:851:17
|
851 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L843
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:843:17
|
843 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L831
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:831:17
|
831 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L822
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:822:17
|
822 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L814
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:814:17
|
814 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L531
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:531:17
|
531 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L521
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:521:17
|
521 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L513
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:513:17
|
513 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L436
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:436:17
|
436 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L429
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:429:24
|
429 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L409
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:409:17
|
409 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L399
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:399:17
|
399 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/wifi/types.rs#L10
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/wifi/types.rs:10:17
|
10 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
item in documentation is missing backticks:
ublox-short-range/src/command/wifi/types.rs#L1
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/wifi/types.rs:1:42
|
1 | //! Argument and parameter types used by WiFi Commands and Responses
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
1 | //! Argument and parameter types used by `WiFi` Commands and Responses
| ~~~~~~
|
usage of wildcard import:
ublox-short-range/src/command/wifi/responses.rs#L2
warning: usage of wildcard import
--> ublox-short-range/src/command/wifi/responses.rs:2:5
|
2 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::{AccessPointConfigResponse, AccessPointId, AccessPointStatus, ScannedWifiNetwork, WifiConfig, WifiStationConfigR, WifiStatus}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
item in documentation is missing backticks:
ublox-short-range/src/command/wifi/responses.rs#L1
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/wifi/responses.rs:1:19
|
1 | //! Responses for WiFi Commands
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
1 | //! Responses for `WiFi` Commands
| ~~~~~~
|
item in documentation is missing backticks:
ublox-short-range/src/command/wifi/mod.rs#L1
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/wifi/mod.rs:1:14
|
1 | //! ### 20 - WiFi Commands
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
1 | //! ### 20 - `WiFi` Commands
| ~~~~~~
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/mod.rs#L264
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/mod.rs:264:17
|
264 | #[derive(Debug, PartialEq, Clone, AtatCmd)]
| ^^^^^^^^^ 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
|
item in documentation is missing backticks:
ublox-short-range/src/command/system/mod.rs#L239
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/system/mod.rs:239:54
|
239 | /// Enable routing of radio signals to EXT_TX_EN and EXT_RX_EN pins.
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
239 | /// Enable routing of radio signals to EXT_TX_EN and `EXT_RX_EN` pins.
| ~~~~~~~~~~~
|
item in documentation is missing backticks:
ublox-short-range/src/command/system/mod.rs#L239
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/system/mod.rs:239:40
|
239 | /// Enable routing of radio signals to EXT_TX_EN and EXT_RX_EN pins.
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
239 | /// Enable routing of radio signals to `EXT_TX_EN` and EXT_RX_EN pins.
| ~~~~~~~~~~~
|
item name starts with its containing module's name:
ublox-short-range/src/command/system/mod.rs#L203
warning: item name starts with its containing module's name
--> ublox-short-range/src/command/system/mod.rs:203:12
|
203 | pub struct SystemStatus {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
item in documentation is missing backticks:
ublox-short-range/src/command/system/mod.rs#L199
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/system/mod.rs:199:45
|
199 | /// Reads current status of the system. If <status_id> is omitted, all applicable ids will be
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
199 | /// Reads current status of the system. If <`status_id`> is omitted, all applicable ids will be
| ~~~~~~~~~~~
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/mod.rs#L156
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/mod.rs:156:17
|
156 | #[derive(Debug, PartialEq, Clone, AtatCmd)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/mod.rs#L130
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/mod.rs:130:17
|
130 | #[derive(Debug, PartialEq, Clone, AtatCmd)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/mod.rs#L117
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/mod.rs:117:17
|
117 | #[derive(Debug, PartialEq, Clone, AtatCmd)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/mod.rs#L101
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/mod.rs:101:17
|
101 | #[derive(Debug, PartialEq, Clone, AtatCmd)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/mod.rs#L80
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/mod.rs:80:17
|
80 | #[derive(Debug, PartialEq, Clone, AtatCmd)]
| ^^^^^^^^^ 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
|
item in documentation is missing backticks:
ublox-short-range/src/command/system/mod.rs#L63
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/system/mod.rs:63:39
|
63 | /// from the DTE in Command Mode. If <echo_on> is omitted, it turns off the echoing.
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
63 | /// from the DTE in Command Mode. If <`echo_on`> is omitted, it turns off the echoing.
| ~~~~~~~~~
|
item in documentation is missing backticks:
ublox-short-range/src/command/system/mod.rs#L51
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/system/mod.rs:51:12
|
51 | /// signal UART_DTR) states.
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
51 | /// signal `UART_DTR`) states.
| ~~~~~~~~~~
|
item in documentation is missing backticks:
ublox-short-range/src/command/system/mod.rs#L50
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/system/mod.rs:50:43
|
50 | /// between ASSERTED (logical 0 on signal UART_DTR) and DEASSERTED (logical 1 on
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
50 | /// between ASSERTED (logical 0 on signal `UART_DTR`) and DEASSERTED (logical 1 on
| ~~~~~~~~~~
|
item in documentation is missing backticks:
ublox-short-range/src/command/system/mod.rs#L38
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/system/mod.rs:38:19
|
38 | /// (logical 1 on UART_DSR signal) states.
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
38 | /// (logical 1 on `UART_DSR` signal) states.
| ~~~~~~~~~~
|
item in documentation is missing backticks:
ublox-short-range/src/command/system/mod.rs#L37
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/system/mod.rs:37:44
|
37 | /// changes between ASSERTED (logical 0 on UART_DSR signal) and DEASSERTED
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
37 | /// changes between ASSERTED (logical 0 on `UART_DSR` signal) and DEASSERTED
| ~~~~~~~~~~
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/mod.rs#L30
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/mod.rs:30:17
|
30 | #[derive(Debug, PartialEq, Clone, AtatCmd)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/mod.rs#L23
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/mod.rs:23:17
|
23 | #[derive(Debug, PartialEq, Clone, AtatCmd)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/mod.rs#L15
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/mod.rs:15:17
|
15 | #[derive(Debug, PartialEq, Clone, AtatCmd)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/system/mod.rs#L7
warning: usage of wildcard import
--> ublox-short-range/src/command/system/mod.rs:7:5
|
7 | use types::*;
| ^^^^^^^^ help: try: `types::{BaudRate, ChangeAfterConfirm, DSRAssertMode, DTRMode, EchoOn, FlowControl, InserfaceID, Mode, ModuleStartMode, Parity, PowerRegulatorSettings, SoftwareUpdateBaudRate, SoftwareUpdateMode, StatusID, StopBits}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
usage of wildcard import:
ublox-short-range/src/command/system/mod.rs#L6
warning: usage of wildcard import
--> ublox-short-range/src/command/system/mod.rs:6:5
|
6 | use responses::*;
| ^^^^^^^^^^^^ help: try: `responses::{LPODetectionResponse, LocalAddressResponse, SoftwareUpdateResponse, SystemStatusResponse}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L175
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:175:24
|
175 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L166
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:166:24
|
166 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L153
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:153:24
|
153 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
item in documentation is missing backticks:
ublox-short-range/src/command/system/types.rs#L155
warning: item in documentation is missing backticks
--> ublox-short-range/src/command/system/types.rs:155:51
|
155 | /// When operating in the extended data mode, the change_after_confirm has no
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
155 | /// When operating in the extended data mode, the `change_after_confirm` has no
| ~~~~~~~~~~~~~~~~~~~~~~
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L142
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:142:24
|
142 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L133
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:133:24
|
133 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L124
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:124:24
|
124 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L101
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:101:24
|
101 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L90
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:90:24
|
90 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L82
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:82:24
|
82 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L72
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:72:24
|
72 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L63
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:63:24
|
63 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L56
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:56:24
|
56 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L47
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:47:24
|
47 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L31
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:31:24
|
31 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L15
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:15:24
|
15 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/types.rs#L5
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/types.rs:5:24
|
5 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/responses.rs#L15
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/responses.rs:15:17
|
15 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/system/responses.rs#L7
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/system/responses.rs:7:17
|
7 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/system/responses.rs#L2
warning: usage of wildcard import
--> ublox-short-range/src/command/system/responses.rs:2:5
|
2 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::{LPODetection, StatusID}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
usage of wildcard import:
ublox-short-range/src/command/security/mod.rs#L8
warning: usage of wildcard import
--> ublox-short-range/src/command/security/mod.rs:8:5
|
8 | use types::*;
| ^^^^^^^^ help: try: `types::SecurityDataType`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
usage of wildcard import:
ublox-short-range/src/command/security/mod.rs#L7
warning: usage of wildcard import
--> ublox-short-range/src/command/security/mod.rs:7:5
|
7 | use responses::*;
| ^^^^^^^^^^^^ help: try: `responses::{ImportResponse, SecurityDataImport, SecurityDataMD5}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/security/types.rs#L18
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/security/types.rs:18:17
|
18 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/security/types.rs#L5
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/security/types.rs:5:17
|
5 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/security/responses.rs#L7
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/security/responses.rs:7:17
|
7 | #[derive(Clone, PartialEq, AtatResp)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/security/responses.rs#L2
warning: usage of wildcard import
--> ublox-short-range/src/command/security/responses.rs:2:5
|
2 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::{SecurityDataType, SecurityOperation}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/ping/urc.rs#L25
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/ping/urc.rs:25:17
|
25 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/ping/urc.rs#L2
warning: usage of wildcard import
--> ublox-short-range/src/command/ping/urc.rs:2:5
|
2 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::PingError`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/ping/types.rs#L28
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/ping/types.rs:28:17
|
28 | #[derive(Debug, PartialEq, Clone, Copy, AtatEnum, defmt::Format)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/network/mod.rs#L8
warning: usage of wildcard import
--> ublox-short-range/src/command/network/mod.rs:8:5
|
8 | use types::*;
| ^^^^^^^^ help: try: `types::{BridgeAction, BridgeConfig, BridgeConfigId, NetworkStatusParameter, RoutingTag, Timing}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
usage of wildcard import:
ublox-short-range/src/command/network/mod.rs#L7
warning: usage of wildcard import
--> ublox-short-range/src/command/network/mod.rs:7:5
|
7 | use responses::*;
| ^^^^^^^^^^^^ help: try: `responses::NetworkStatusResponse`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/network/urc.rs#L13
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/network/urc.rs:13:17
|
13 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/network/urc.rs#L6
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/network/urc.rs:6:17
|
6 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/network/urc.rs#L2
warning: usage of wildcard import
--> ublox-short-range/src/command/network/urc.rs:2:5
|
2 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::ErrorType`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/network/types.rs#L270
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/network/types.rs:270:24
|
270 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/network/types.rs#L245
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/network/types.rs:245:17
|
245 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/network/types.rs#L223
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/network/types.rs:223:17
|
223 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/network/types.rs#L216
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/network/types.rs:216:17
|
216 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/network/types.rs#L142
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/network/types.rs:142:17
|
142 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/network/types.rs#L136
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/network/types.rs:136:17
|
136 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/network/types.rs#L123
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/network/types.rs:123:17
|
123 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/network/types.rs#L111
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/network/types.rs:111:17
|
111 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/network/types.rs#L66
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/network/types.rs:66:17
|
66 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/network/responses.rs#L2
warning: usage of wildcard import
--> ublox-short-range/src/command/network/responses.rs:2:5
|
2 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::{NetworkIpv6Status, NetworkStatus}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
usage of wildcard import:
ublox-short-range/src/command/gpio/mod.rs#L7
warning: usage of wildcard import
--> ublox-short-range/src/command/gpio/mod.rs:7:5
|
7 | use types::*;
| ^^^^^^^^ help: try: `types::{GPIOId, GPIOMode, GPIOValue}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
usage of wildcard import:
ublox-short-range/src/command/gpio/mod.rs#L6
warning: usage of wildcard import
--> ublox-short-range/src/command/gpio/mod.rs:6:5
|
6 | use responses::*;
| ^^^^^^^^^^^^ help: try: `responses::ReadGPIOResponse`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/gpio/types.rs#L86
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/gpio/types.rs:86:17
|
86 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/gpio/types.rs#L74
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/gpio/types.rs:74:17
|
74 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/gpio/types.rs#L66
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/gpio/types.rs:66:17
|
66 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/gpio/types.rs#L4
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/gpio/types.rs:4:17
|
4 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/gpio/responses.rs#L2
warning: usage of wildcard import
--> ublox-short-range/src/command/gpio/responses.rs:2:5
|
2 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::{GPIOId, GPIOValue}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
usage of wildcard import:
ublox-short-range/src/command/general/mod.rs#L7
warning: usage of wildcard import
--> ublox-short-range/src/command/general/mod.rs:7:5
|
7 | use types::*;
| ^^^^^^^^ help: try: `types::GreetingTextMode`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
usage of wildcard import:
ublox-short-range/src/command/general/mod.rs#L6
warning: usage of wildcard import
--> ublox-short-range/src/command/general/mod.rs:6:5
|
6 | use responses::*;
| ^^^^^^^^^^^^ help: try: `responses::{IdentificationInfomationMCUIDResponse, IdentificationInfomationSoftwareVersionResponse, IdentificationInfomationTypeCodeResponse, ManufacturerIdentificationResponse, ModelIdentificationResponse, SerialNumberResponse, SoftwareVersionResponse}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
consider adding a `;` to the last statement for consistent formatting:
ublox-short-range/src/command/general/types.rs#L111
warning: consider adding a `;` to the last statement for consistent formatting
--> ublox-short-range/src/command/general/types.rs:111:13
|
111 | defmt::write!(fmt, "{}.{}.{}", self.major, self.minor, self.patch,)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `defmt::write!(fmt, "{}.{}.{}", self.major, self.minor, self.patch,);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
consider adding a `;` to the last statement for consistent formatting:
ublox-short-range/src/command/general/types.rs#L109
warning: consider adding a `;` to the last statement for consistent formatting
--> ublox-short-range/src/command/general/types.rs:109:13
|
109 | defmt::write!(fmt, "{}.{}.{}-{}", self.major, self.minor, self.patch, meta)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `defmt::write!(fmt, "{}.{}.{}-{}", self.major, self.minor, self.patch, meta);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
use Option::map_or_else instead of an if let/else:
ublox-short-range/src/command/general/types.rs#L108
warning: use Option::map_or_else instead of an if let/else
--> ublox-short-range/src/command/general/types.rs:108:9
|
108 | / if let Some(meta) = &self.meta {
109 | | defmt::write!(fmt, "{}.{}.{}-{}", self.major, self.minor, self.patch, meta)
110 | | } else {
111 | | defmt::write!(fmt, "{}.{}.{}", self.major, self.minor, self.patch,)
112 | | }
| |_________^ help: try: `self.meta.as_ref().map_or_else(|| defmt::write!(fmt, "{}.{}.{}", self.major, self.minor, self.patch,), |meta| defmt::write!(fmt, "{}.{}.{}-{}", self.major, self.minor, self.patch, meta))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
|
this could be a `const fn`:
ublox-short-range/src/command/general/types.rs#L39
warning: this could be a `const fn`
--> ublox-short-range/src/command/general/types.rs:39:5
|
39 | / pub fn new(major: u8, minor: u8, patch: u8) -> Self {
40 | | Self {
41 | | major,
42 | | minor,
... |
45 | | }
46 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
this method could have a `#[must_use]` attribute:
ublox-short-range/src/command/general/types.rs#L39
warning: this method could have a `#[must_use]` attribute
--> ublox-short-range/src/command/general/types.rs:39:5
|
39 | pub fn new(major: u8, minor: u8, patch: u8) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new(major: u8, minor: u8, patch: u8) -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
= note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic`
|
you are deriving `Ord` but have implemented `PartialOrd` explicitly:
ublox-short-range/src/command/general/types.rs#L30
warning: you are deriving `Ord` but have implemented `PartialOrd` explicitly
--> ublox-short-range/src/command/general/types.rs:30:39
|
30 | #[derive(Debug, Clone, PartialEq, Eq, Ord)]
| ^^^
|
note: `PartialOrd` implemented here
--> ublox-short-range/src/command/general/types.rs:49:1
|
49 | impl PartialOrd for FirmwareVersion {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord
= note: `-W clippy::derive-ord-xor-partial-ord` implied by `-W clippy::all`
= note: this warning originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/general/types.rs#L19
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/general/types.rs:19:17
|
19 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/general/types.rs#L8
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/general/types.rs:8:17
|
8 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/general/responses.rs#L2
warning: usage of wildcard import
--> ublox-short-range/src/command/general/responses.rs:2:5
|
2 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::FirmwareVersion`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
item name starts with its containing module's name:
ublox-short-range/src/command/ethernet/mod.rs#L43
warning: item name starts with its containing module's name
--> ublox-short-range/src/command/ethernet/mod.rs:43:12
|
43 | pub struct EthernetConfigurationAction {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
usage of wildcard import:
ublox-short-range/src/command/ethernet/mod.rs#L8
warning: usage of wildcard import
--> ublox-short-range/src/command/ethernet/mod.rs:8:5
|
8 | use types::*;
| ^^^^^^^^ help: try: `types::{EthernetConfig, EthernetConfigAction, EthernetConfigParameter}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
usage of wildcard import:
ublox-short-range/src/command/ethernet/mod.rs#L7
warning: usage of wildcard import
--> ublox-short-range/src/command/ethernet/mod.rs:7:5
|
7 | use responses::*;
| ^^^^^^^^^^^^ help: try: `responses::EthernetConfigurationResponse`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/ethernet/urc.rs#L9
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/ethernet/urc.rs:9:17
|
9 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/ethernet/urc.rs#L5
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/ethernet/urc.rs:5:17
|
5 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/ethernet/types.rs#L212
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/ethernet/types.rs:212:17
|
212 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/ethernet/types.rs#L205
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/ethernet/types.rs:205:17
|
205 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/ethernet/types.rs#L198
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/ethernet/types.rs:198:17
|
198 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/ethernet/types.rs#L191
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/ethernet/types.rs:191:17
|
191 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/ethernet/types.rs#L8
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/ethernet/types.rs:8:17
|
8 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/ethernet/responses.rs#L2
warning: usage of wildcard import
--> ublox-short-range/src/command/ethernet/responses.rs:2:5
|
2 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::EthernetConfigR`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
used `cloned` where `copied` could be used instead:
ublox-short-range/src/command/edm/mod.rs#L208
warning: used `cloned` where `copied` could be used instead
--> ublox-short-range/src/command/edm/mod.rs:208:10
|
208 | .cloned()
| ^^^^^^ help: try: `copied`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied
|
item name starts with its containing module's name:
ublox-short-range/src/command/edm/mod.rs#L193
warning: item name starts with its containing module's name
--> ublox-short-range/src/command/edm/mod.rs:193:12
|
193 | pub struct EdmResendConnectEventsCommand;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
used `cloned` where `copied` could be used instead:
ublox-short-range/src/command/edm/mod.rs#L179
warning: used `cloned` where `copied` could be used instead
--> ublox-short-range/src/command/edm/mod.rs:179:33
|
179 | .chain(self.data.iter().cloned())
| ^^^^^^ help: try: `copied`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied
|
used `cloned` where `copied` could be used instead:
ublox-short-range/src/command/edm/mod.rs#L178
warning: used `cloned` where `copied` could be used instead
--> ublox-short-range/src/command/edm/mod.rs:178:10
|
178 | .cloned()
| ^^^^^^ help: try: `copied`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied
|
casting `usize` to `u16` may truncate the value:
ublox-short-range/src/command/edm/mod.rs#L168
warning: casting `usize` to `u16` may truncate the value
--> ublox-short-range/src/command/edm/mod.rs:168:27
|
168 | let payload_len = (self.data.len() + 3) as u16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
168 | let payload_len = u16::try_from(self.data.len() + 3);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
item name starts with its containing module's name:
ublox-short-range/src/command/edm/mod.rs#L157
warning: item name starts with its containing module's name
--> ublox-short-range/src/command/edm/mod.rs:157:12
|
157 | pub struct EdmDataCommand<'a> {
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
use Option::map_or_else instead of an if let/else:
ublox-short-range/src/command/edm/mod.rs#L139
warning: use Option::map_or_else instead of an if let/else
--> ublox-short-range/src/command/edm/mod.rs:139:13
|
139 | / match resp
140 | | .windows(b"\r\nOK".len())
141 | | .position(|window| window == b"\r\nOK")
142 | | {
... |
147 | | None => Ok(&resp[AT_COMMAND_POSITION..PAYLOAD_POSITION + payload_len]),
148 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
help: try
|
139 ~ resp
140 + .windows(b"\r\nOK".len())
141 + .position(|window| window == b"\r\nOK").map_or_else(|| Ok(&resp[AT_COMMAND_POSITION..PAYLOAD_POSITION + payload_len]), |pos| Ok(&resp[AT_COMMAND_POSITION..pos]))
|
|
used `cloned` where `copied` could be used instead:
ublox-short-range/src/command/edm/mod.rs#L112
warning: used `cloned` where `copied` could be used instead
--> ublox-short-range/src/command/edm/mod.rs:112:10
|
112 | .cloned()
| ^^^^^^ help: try: `copied`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied
|
casting `usize` to `u16` may truncate the value:
ublox-short-range/src/command/edm/mod.rs#L103
warning: casting `usize` to `u16` may truncate the value
--> ublox-short-range/src/command/edm/mod.rs:103:27
|
103 | let payload_len = (at_vec.len() + 2) as u16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
help: ... or use `try_from` and handle the error accordingly
|
103 | let payload_len = u16::try_from(at_vec.len() + 2);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
use Option::map_or_else instead of an if let/else:
ublox-short-range/src/command/edm/mod.rs#L73
warning: use Option::map_or_else instead of an if let/else
--> ublox-short-range/src/command/edm/mod.rs:73:13
|
73 | / match resp
74 | | .windows(b"\r\nOK".len())
75 | | .position(|window| window == b"\r\nOK")
76 | | {
... |
81 | | None => Ok(&resp[AT_COMMAND_POSITION..PAYLOAD_POSITION + payload_len]),
82 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
help: try
|
73 ~ resp
74 + .windows(b"\r\nOK".len())
75 + .position(|window| window == b"\r\nOK").map_or_else(|| Ok(&resp[AT_COMMAND_POSITION..PAYLOAD_POSITION + payload_len]), |pos| Ok(&resp[AT_COMMAND_POSITION..pos]))
|
|
used `cloned` where `copied` could be used instead:
ublox-short-range/src/command/edm/mod.rs#L46
warning: used `cloned` where `copied` could be used instead
--> ublox-short-range/src/command/edm/mod.rs:46:10
|
46 | .cloned()
| ^^^^^^ help: try: `copied`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied
= note: `-W clippy::cloned-instead-of-copied` implied by `-W clippy::pedantic`
|
casting `usize` to `u16` may truncate the value:
ublox-short-range/src/command/edm/mod.rs#L37
warning: casting `usize` to `u16` may truncate the value
--> ublox-short-range/src/command/edm/mod.rs:37:27
|
37 | let payload_len = (at_vec.len() + 2) as u16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
= note: `-W clippy::cast-possible-truncation` implied by `-W clippy::pedantic`
help: ... or use `try_from` and handle the error accordingly
|
37 | let payload_len = u16::try_from(at_vec.len() + 2);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
usage of wildcard import:
ublox-short-range/src/command/edm/mod.rs#L13
warning: usage of wildcard import
--> ublox-short-range/src/command/edm/mod.rs:13:5
|
13 | use types::*;
| ^^^^^^^^ help: try: `types::{AT_COMMAND_POSITION, ChannelId, EDM_FULL_SIZE_FILTER, EDM_OVERHEAD, EDM_SIZE_FILTER, ENDBYTE, PAYLOAD_OVERHEAD, PAYLOAD_POSITION, PayloadType, STARTBYTE}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/urc.rs#L156
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/urc.rs:156:40
|
156 | PayloadType::StartEvent => EdmEvent::StartUp.into(),
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/urc.rs#L139
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/urc.rs:139:17
|
139 | EdmEvent::DisconnectEvent(ChannelId(resp[5])).into()
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/urc.rs#L129
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/urc.rs:129:25
|
129 | EdmEvent::IPv6ConnectEvent(event).into()
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
casting `u8` to `u16` may become silently lossy if you later change the type:
ublox-short-range/src/command/edm/urc.rs#L123
warning: casting `u8` to `u16` may become silently lossy if you later change the type
--> ublox-short-range/src/command/edm/urc.rs:123:68
|
123 | ... local_port: ((resp[42] as u16) << 8) | resp[43] as u16,
| ^^^^^^^^^^^^^^^ help: try: `u16::from(resp[43])`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
|
casting `u8` to `u16` may become silently lossy if you later change the type:
ublox-short-range/src/command/edm/urc.rs#L123
warning: casting `u8` to `u16` may become silently lossy if you later change the type
--> ublox-short-range/src/command/edm/urc.rs:123:42
|
123 | ... local_port: ((resp[42] as u16) << 8) | resp[43] as u16,
| ^^^^^^^^^^^^^^^^^ help: try: `u16::from(resp[42])`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
|
casting `u8` to `u16` may become silently lossy if you later change the type:
ublox-short-range/src/command/edm/urc.rs#L117
warning: casting `u8` to `u16` may become silently lossy if you later change the type
--> ublox-short-range/src/command/edm/urc.rs:117:69
|
117 | ... remote_port: ((resp[24] as u16) << 8) | resp[25] as u16,
| ^^^^^^^^^^^^^^^ help: try: `u16::from(resp[25])`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
|
casting `u8` to `u16` may become silently lossy if you later change the type:
ublox-short-range/src/command/edm/urc.rs#L117
warning: casting `u8` to `u16` may become silently lossy if you later change the type
--> ublox-short-range/src/command/edm/urc.rs:117:43
|
117 | ... remote_port: ((resp[24] as u16) << 8) | resp[25] as u16,
| ^^^^^^^^^^^^^^^^^ help: try: `u16::from(resp[24])`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/urc.rs#L103
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/urc.rs:103:25
|
103 | EdmEvent::IPv4ConnectEvent(event).into()
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
casting `u8` to `u16` may become silently lossy if you later change the type:
ublox-short-range/src/command/edm/urc.rs#L97
warning: casting `u8` to `u16` may become silently lossy if you later change the type
--> ublox-short-range/src/command/edm/urc.rs:97:68
|
97 | ... local_port: ((resp[18] as u16) << 8) | resp[19] as u16,
| ^^^^^^^^^^^^^^^ help: try: `u16::from(resp[19])`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
|
casting `u8` to `u16` may become silently lossy if you later change the type:
ublox-short-range/src/command/edm/urc.rs#L97
warning: casting `u8` to `u16` may become silently lossy if you later change the type
--> ublox-short-range/src/command/edm/urc.rs:97:42
|
97 | ... local_port: ((resp[18] as u16) << 8) | resp[19] as u16,
| ^^^^^^^^^^^^^^^^^ help: try: `u16::from(resp[18])`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
|
casting `u8` to `u16` may become silently lossy if you later change the type:
ublox-short-range/src/command/edm/urc.rs#L95
warning: casting `u8` to `u16` may become silently lossy if you later change the type
--> ublox-short-range/src/command/edm/urc.rs:95:69
|
95 | ... remote_port: ((resp[12] as u16) << 8) | resp[13] as u16,
| ^^^^^^^^^^^^^^^ help: try: `u16::from(resp[13])`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
|
casting `u8` to `u16` may become silently lossy if you later change the type:
ublox-short-range/src/command/edm/urc.rs#L95
warning: casting `u8` to `u16` may become silently lossy if you later change the type
--> ublox-short-range/src/command/edm/urc.rs:95:43
|
95 | ... remote_port: ((resp[12] as u16) << 8) | resp[13] as u16,
| ^^^^^^^^^^^^^^^^^ help: try: `u16::from(resp[12])`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: `-W clippy::cast-lossless` implied by `-W clippy::pedantic`
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/urc.rs#L78
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/urc.rs:78:17
|
78 | EdmEvent::ATEvent(cmd).into()
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
use Option::map_or instead of an if let/else:
ublox-short-range/src/command/edm/urc.rs#L73
warning: use Option::map_or instead of an if let/else
--> ublox-short-range/src/command/edm/urc.rs:73:17
|
73 | / match urc.iter().position(|x| !x.is_ascii_whitespace()) {
74 | | Some(i) => urc = &urc[i..],
75 | | None => (),
76 | | };
| |_________________^ help: try: `urc.iter().position(|x| !x.is_ascii_whitespace()).map_or((), |i| urc = &urc[i..])`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
ublox-short-range/src/command/edm/urc.rs#L73
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> ublox-short-range/src/command/edm/urc.rs:73:17
|
73 | / match urc.iter().position(|x| !x.is_ascii_whitespace()) {
74 | | Some(i) => urc = &urc[i..],
75 | | None => (),
76 | | };
| |_________________^ help: try this: `if let Some(i) = urc.iter().position(|x| !x.is_ascii_whitespace()) { urc = &urc[i..] }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
|
this expression creates a reference which is immediately dereferenced by the compiler:
ublox-short-range/src/command/edm/urc.rs#L61
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ublox-short-range/src/command/edm/urc.rs:61:77
|
61 | defmt::error!("[Parse URC Start/End byte Error] {:?}", LossyStr(&resp));
| ^^^^^ help: change this to: `resp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/urc.rs#L54
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/urc.rs:54:20
|
54 | return EdmEvent::StartUp.into();
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/urc.rs#L46
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/urc.rs:46:24
|
46 | return EdmEvent::ATEvent(cmd).into();
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
use Option::map_or instead of an if let/else:
ublox-short-range/src/command/edm/urc.rs#L41
warning: use Option::map_or instead of an if let/else
--> ublox-short-range/src/command/edm/urc.rs:41:17
|
41 | / match urc.iter().position(|x| !x.is_ascii_whitespace()) {
42 | | Some(i) => urc = &urc[i..],
43 | | None => (),
44 | | };
| |_________________^ help: try: `urc.iter().position(|x| !x.is_ascii_whitespace()).map_or((), |i| urc = &urc[i..])`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
ublox-short-range/src/command/edm/urc.rs#L41
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> ublox-short-range/src/command/edm/urc.rs:41:17
|
41 | / match urc.iter().position(|x| !x.is_ascii_whitespace()) {
42 | | Some(i) => urc = &urc[i..],
43 | | None => (),
44 | | };
| |_________________^ help: try this: `if let Some(i) = urc.iter().position(|x| !x.is_ascii_whitespace()) { urc = &urc[i..] }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `-W clippy::single-match` implied by `-W clippy::all`
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/urc.rs#L36
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/urc.rs:36:24
|
36 | return EdmEvent::ATEvent(Urc::StartUp).into();
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
this function has too many lines (122/100):
ublox-short-range/src/command/edm/urc.rs#L27
warning: this function has too many lines (122/100)
--> ublox-short-range/src/command/edm/urc.rs:27:5
|
27 | / fn parse(resp: &[u8]) -> Option<Self::Response> {
28 | | defmt::trace!("[Parse URC] {:?}", LossyStr(resp));
29 | | // Startup message?
30 | | // TODO: simplify mayby no packet check.
... |
162 | | }
163 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/urc.rs#L24
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/urc.rs:24:21
|
24 | type Response = EdmEvent;
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
large size difference between variants:
ublox-short-range/src/command/edm/urc.rs#L10
warning: large size difference between variants
--> ublox-short-range/src/command/edm/urc.rs:10:1
|
10 | / pub enum EdmEvent {
11 | | BluetoothConnectEvent(BluetoothConnectEvent),
12 | | IPv4ConnectEvent(IPv4ConnectEvent),
13 | | IPv6ConnectEvent(IPv6ConnectEvent),
... |
16 | | DataEvent(DataEvent),
| | -------------------- the largest variant contains at least 4112 bytes
17 | | ATEvent(Urc),
| | ------------ the second-largest variant contains at least 112 bytes
18 | | // TODO: Handle module restart. Especially to Digest
19 | | StartUp,
20 | | }
| |_^ the entire enum is at least 4120 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
= note: `-W clippy::large-enum-variant` implied by `-W clippy::all`
help: consider boxing the large fields to reduce the total size of the enum
|
16 | DataEvent(Box<DataEvent>),
| ~~~~~~~~~~~~~~
|
usage of wildcard import:
ublox-short-range/src/command/edm/urc.rs#L2
warning: usage of wildcard import
--> ublox-short-range/src/command/edm/urc.rs:2:5
|
2 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::{AT_COMMAND_POSITION, AUTOCONNECTMESSAGE, BluetoothConnectEvent, ChannelId, ConnectType, DataEvent, EDM_OVERHEAD, ENDBYTE, IPv4ConnectEvent, IPv6ConnectEvent, PAYLOAD_OVERHEAD, PAYLOAD_POSITION, PayloadType, Protocol, STARTBYTE, STARTUPMESSAGE}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L167
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:167:18
|
167 | _ => Protocol::Unknown,
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L166
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:166:18
|
166 | 1 => Protocol::UDP,
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L165
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:165:18
|
165 | 0 => Protocol::TCP,
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/edm/types.rs#L154
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/edm/types.rs:154:24
|
154 | #[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
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L149
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:149:18
|
149 | _ => ConnectType::Unknown,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L148
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:148:18
|
148 | 3 => ConnectType::IPv6,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L147
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:147:18
|
147 | 2 => ConnectType::IPv4,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L146
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:146:18
|
146 | 1 => ConnectType::Bluetooth,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/edm/types.rs#L134
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/edm/types.rs:134:30
|
134 | #[derive(Debug, Clone, Copy, 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/edm/types.rs#L126
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/edm/types.rs:126:30
|
126 | #[derive(Debug, Clone, Copy, 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/edm/types.rs#L120
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/edm/types.rs:120:24
|
120 | #[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
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L88
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:88:18
|
88 | _ => PayloadType::Unknown,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L87
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:87:21
|
87 | 0x71 => PayloadType::StartEvent,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L86
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:86:21
|
86 | 0x61 => PayloadType::IPhoneEvent,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L85
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:85:21
|
85 | 0x56 => PayloadType::ResendConnectEventsCommand,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L84
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:84:21
|
84 | 0x41 => PayloadType::ATEvent,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L83
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:83:21
|
83 | 0x45 => PayloadType::ATConfirmation,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L82
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:82:21
|
82 | 0x44 => PayloadType::ATRequest,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L81
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:81:21
|
81 | 0x36 => PayloadType::DataCommand,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L80
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:80:21
|
80 | 0x31 => PayloadType::DataEvent,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L79
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:79:21
|
79 | 0x21 => PayloadType::DisconnectEvent,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
unnecessary structure name repetition:
ublox-short-range/src/command/edm/types.rs#L78
warning: unnecessary structure name repetition
--> ublox-short-range/src/command/edm/types.rs:78:21
|
78 | 0x11 => PayloadType::ConnectEvent,
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
|
usage of wildcard import:
ublox-short-range/src/command/data_mode/mod.rs#L9
warning: usage of wildcard import
--> ublox-short-range/src/command/data_mode/mod.rs:9:5
|
9 | use types::*;
| ^^^^^^^^ help: try: `types::{ConnectScheme, Mode, PeerConfigParameter, RemoteConfiguration, ServerType, WatchdogSetting}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
usage of wildcard import:
ublox-short-range/src/command/data_mode/mod.rs#L8
warning: usage of wildcard import
--> ublox-short-range/src/command/data_mode/mod.rs:8:5
|
8 | use responses::*;
| ^^^^^^^^^^^^ help: try: `responses::{BindResponse, ConnectPeerResponse, PeerListResponse}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/data_mode/urc.rs#L32
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/data_mode/urc.rs:32:17
|
32 | #[derive(Debug, PartialEq, Clone, AtatResp)]
| ^^^^^^^^^ 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
|
usage of wildcard import:
ublox-short-range/src/command/data_mode/urc.rs#L4
warning: usage of wildcard import
--> ublox-short-range/src/command/data_mode/urc.rs:4:5
|
4 | use super::types::*;
| ^^^^^^^^^^^^^^^ help: try: `super::types::{ConnectionType, IPProtocol}`
|
= 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`
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/data_mode/types.rs#L238
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/data_mode/types.rs:238:24
|
238 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/data_mode/types.rs#L220
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/data_mode/types.rs:220:24
|
220 | #[derive(Debug, Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/data_mode/types.rs#L107
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/data_mode/types.rs:107:17
|
107 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/data_mode/types.rs#L99
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/data_mode/types.rs:99:17
|
99 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/data_mode/types.rs#L92
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/data_mode/types.rs:92:17
|
92 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/data_mode/types.rs#L77
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/data_mode/types.rs:77:17
|
77 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/data_mode/types.rs#L65
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/data_mode/types.rs:65:17
|
65 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/data_mode/types.rs#L21
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/data_mode/types.rs:21:17
|
21 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/command/data_mode/types.rs#L7
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/command/data_mode/types.rs:7:17
|
7 | #[derive(Clone, PartialEq, AtatEnum)]
| ^^^^^^^^^ 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
|
this expression creates a reference which is immediately dereferenced by the compiler:
ublox-short-range/src/command/custom_digest.rs#L70
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ublox-short-range/src/command/custom_digest.rs:70:51
|
70 | defmt::trace!("Digest {:?}", LossyStr(&buf));
| ^^^^ help: change this to: `buf`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this could be rewritten as `let...else`:
ublox-short-range/src/command/custom_digest.rs#L47
warning: this could be rewritten as `let...else`
--> ublox-short-range/src/command/custom_digest.rs:47:9
|
47 | / let start_pos = match buf.windows(1).position(|byte| byte[0] == STARTBYTE) {
48 | | Some(pos) => pos,
49 | | None => return (DigestResult::None, 0), // handle leading error data. // TODO: handle error input without message start.
50 | | };
| |__________^ help: consider writing: `let Some(start_pos) = buf.windows(1).position(|byte| byte[0] == STARTBYTE) else { return (DigestResult::None, 0) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
= note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic`
|
this expression creates a reference which is immediately dereferenced by the compiler:
ublox-short-range/src/command/custom_digest.rs#L21
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ublox-short-range/src/command/custom_digest.rs:21:47
|
21 | defmt::trace!("Digest {:?}", LossyStr(&buf));
| ^^^^ help: change this to: `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`
|
consider adding a `;` to the last statement for consistent formatting:
ublox-short-range/src/hex.rs#L28
warning: consider adding a `;` to the last statement for consistent formatting
--> ublox-short-range/src/hex.rs:28:9
|
28 | hex[i] = val(hex[i * 2])? << 4 | val(hex[i * 2 + 1])?
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `hex[i] = val(hex[i * 2])? << 4 | val(hex[i * 2 + 1])?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
item name ends with its containing module's name:
ublox-short-range/src/hex.rs#L21
warning: item name ends with its containing module's name
--> ublox-short-range/src/hex.rs:21:8
|
21 | pub fn from_hex(hex: &mut [u8]) -> Result<&[u8], FromHexError> {
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
|
this could be a `const fn`:
ublox-short-range/src/hex.rs#L12
warning: this could be a `const fn`
--> ublox-short-range/src/hex.rs:12:1
|
12 | / fn val(c: u8) -> Result<u8, FromHexError> {
13 | | match c {
14 | | b'A'..=b'F' => Ok(c - b'A' + 10),
15 | | b'a'..=b'f' => Ok(c - b'a' + 10),
... |
18 | | }
19 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/hex.rs#L1
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/hex.rs:1:30
|
1 | #[derive(Debug, Clone, Copy, 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
|
use Option::map_or instead of an if let/else:
ublox-short-range/src/client.rs#L901
warning: use Option::map_or instead of an if let/else
--> ublox-short-range/src/client.rs:901:9
|
901 | / if let Some(ref con) = self.wifi_connection {
902 | | if !self.initialized {
903 | | Err(Error::Uninitialized)
904 | | // } else if !(con.network_state == NetworkState::Attached) {
... |
915 | | Err(Error::NoWifiSetup)
916 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
help: try
|
901 ~ self.wifi_connection.as_ref().map_or(Err(Error::NoWifiSetup), |con| if !self.initialized {
902 + Err(Error::Uninitialized)
903 + // } else if !(con.network_state == NetworkState::Attached) {
904 + } else if !con.is_connected() {
905 + if con.wifi_state == WiFiState::Connected {
906 + Err(Error::NetworkState(con.network_state))
907 + } else {
908 + Err(Error::WifiState(con.wifi_state))
909 + }
910 + } else {
911 + Ok(())
912 + })
|
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/client.rs#L900
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/client.rs:900:5
|
900 | pub fn attached_to_wifi(&self) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
item in documentation is missing backticks:
ublox-short-range/src/client.rs#L895
warning: item in documentation is missing backticks
--> ublox-short-range/src/client.rs:895:37
|
895 | /// Is the module attached to a WiFi
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
895 | /// Is the module attached to a `WiFi`
| ~~~~~~
|
use Option::map_or instead of an if let/else:
ublox-short-range/src/client.rs#L880
warning: use Option::map_or instead of an if let/else
--> ublox-short-range/src/client.rs:880:9
|
880 | / if let Some(ref con) = self.wifi_connection {
881 | | if !self.initialized {
882 | | Err(Error::Uninitialized)
883 | | } else if !con.is_connected() {
... |
891 | | Err(Error::NoWifiSetup)
892 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
= note: `-W clippy::option-if-let-else` implied by `-W clippy::nursery`
help: try
|
880 ~ self.wifi_connection.as_ref().map_or(Err(Error::NoWifiSetup), |con| if !self.initialized {
881 + Err(Error::Uninitialized)
882 + } else if !con.is_connected() {
883 + Err(Error::WifiState(con.wifi_state))
884 + } else if self.sockets.is_none() {
885 + Err(Error::MissingSocketSet)
886 + } else {
887 + Ok(())
888 + })
|
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/client.rs#L879
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/client.rs:879:5
|
879 | pub fn connected_to_network(&self) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
item in documentation is missing backticks:
ublox-short-range/src/client.rs#L878
warning: item in documentation is missing backticks
--> ublox-short-range/src/client.rs:878:37
|
878 | /// Is the module attached to a WiFi and ready to open sockets
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
= note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic`
help: try
|
878 | /// Is the module attached to a `WiFi` and ready to open sockets
| ~~~~~~
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/client.rs#L866
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/client.rs:866:5
|
866 | pub fn supplicant<const M: usize>(&mut self) -> Result<Supplicant<C, M>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/client.rs#L853
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/client.rs:853:5
|
853 | / pub fn send_at<A, const LEN: usize>(&mut self, cmd: A) -> Result<A::Response, Error>
854 | | where
855 | | A: atat::AtatCmd<LEN>,
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
unnecessary boolean `not` operation:
ublox-short-range/src/client.rs#L790
warning: unnecessary boolean `not` operation
--> ublox-short-range/src/client.rs:790:25
|
790 | / if !event.data.is_empty() {
791 | | if let Some(socket_handle) =
792 | | socket_map.channel_to_socket(&event.channel_id)
793 | | {
... |
829 | | false
830 | | }
| |_________________________^
|
= 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`
|
wildcard matches only a single variant and will also match any future added variants:
ublox-short-range/src/client.rs#L768
warning: wildcard matches only a single variant and will also match any future added variants
--> ublox-short-range/src/client.rs:768:41
|
768 | ... _ => {}
| ^ help: try this: `Protocol::Unknown`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
|
wildcard matches only a single variant and will also match any future added variants:
ublox-short-range/src/client.rs#L721
warning: wildcard matches only a single variant and will also match any future added variants
--> ublox-short-range/src/client.rs:721:41
|
721 | ... _ => {}
| ^ help: try this: `Protocol::Unknown`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
= note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic`
|
consider adding a `;` to the last statement for consistent formatting:
ublox-short-range/src/client.rs#L672
warning: consider adding a `;` to the last statement for consistent formatting
--> ublox-short-range/src/client.rs:672:33
|
672 | ... *dns_state = DNSState::Error(resp.error)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `*dns_state = DNSState::Error(resp.error);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
consider adding a `;` to the last statement for consistent formatting:
ublox-short-range/src/client.rs#L665
warning: consider adding a `;` to the last statement for consistent formatting
--> ublox-short-range/src/client.rs:665:33
|
665 | ... *dns_state = DNSState::Resolved(resp.ip)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `*dns_state = DNSState::Resolved(resp.ip);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
consider adding a `;` to the last statement for consistent formatting:
ublox-short-range/src/client.rs#L642
warning: consider adding a `;` to the last statement for consistent formatting
--> ublox-short-range/src/client.rs:642:45
|
642 | ... con.network_state = NetworkState::AlmostAttached
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `con.network_state = NetworkState::AlmostAttached;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
consider adding a `;` to the last statement for consistent formatting:
ublox-short-range/src/client.rs#L639
warning: consider adding a `;` to the last statement for consistent formatting
--> ublox-short-range/src/client.rs:639:45
|
639 | ... con.network_state = NetworkState::Attached
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `con.network_state = NetworkState::Attached;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L512
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:512:41
|
512 | ... IPProtocol::UDP => {
| ^--------------
| |
| _______________________help: try merging the arm patterns: `IPProtocol::UDP | IPProtocol::TCP`
| |
513 | | ... // if let Ok(mut udp) =
514 | | ... // sockets.get::<UdpSocket<TIMER_HZ, L>>(event.handle)
515 | | ... // {
... |
524 | | ... // }
525 | | ... }
| |_______________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:499:41
|
499 | / ... IPProtocol::TCP => {
500 | | ... // if let Ok(mut tcp) =
501 | | ... // sockets.get::<TcpSocket<CLK, L>>(event.handle)
502 | | ... // {
... |
510 | | ... // }
511 | | ... }
| |_______________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
consider adding a `;` to the last statement for consistent formatting:
ublox-short-range/src/client.rs#L494
warning: consider adding a `;` to the last statement for consistent formatting
--> ublox-short-range/src/client.rs:494:41
|
494 | ... handled = false
| ^^^^^^^^^^^^^^^ help: add a `;` here: `handled = false;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
ublox-short-range/src/client.rs#L481
warning: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> ublox-short-range/src/client.rs:481:103
|
481 | ... if socket_map.insert_peer(peer_handle, socket_handle).map_err(|_| {
| _________________________________________________________________________________________^
482 | | ... error!("[UDP_URC] Opening socket Error: Socket Map full");
483 | | ... Error::SocketMapMemory
484 | | ... }).is_err(){
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
|
in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
ublox-short-range/src/client.rs#L474
warning: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> ublox-short-range/src/client.rs:474:76
|
474 | ... if sockets.add(new_socket).map_err(|_| {
| ______________________________________________________________^
475 | | ... error!("[UDP_URC] Opening socket Error: Socket set full");
476 | | ... Error::SocketMemory
477 | | ... }).is_err(){
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
= note: `-W clippy::blocks-in-if-conditions` implied by `-W clippy::all`
|
consider adding a `;` to the last statement for consistent formatting:
ublox-short-range/src/client.rs#L472
warning: consider adding a `;` to the last statement for consistent formatting
--> ublox-short-range/src/client.rs:472:41
|
472 | ... handled = false
| ^^^^^^^^^^^^^^^ help: add a `;` here: `handled = false;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic`
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L628
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:628:25
|
628 | Urc::EthernetLinkDown(_) => {
| ^-----------------------
| |
| _________________________help: try merging the arm patterns: `Urc::EthernetLinkDown(_) | Urc::NetworkError(_)`
| |
629 | | debug!("[URC] EthernetLinkDown");
630 | | true
631 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:658:25
|
658 | / Urc::NetworkError(_) => {
659 | | debug!("[URC] NetworkError");
660 | | true
661 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L624
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:624:25
|
624 | Urc::EthernetLinkUp(_) => {
| ^---------------------
| |
| _________________________help: try merging the arm patterns: `Urc::EthernetLinkUp(_) | Urc::NetworkError(_)`
| |
625 | | debug!("[URC] EthernetLinkUp");
626 | | true
627 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:658:25
|
658 | / Urc::NetworkError(_) => {
659 | | debug!("[URC] NetworkError");
660 | | true
661 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L620
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:620:25
|
620 | Urc::WifiAPStationDisconnected(_) => {
| ^--------------------------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPStationDisconnected(_) | Urc::NetworkError(_)`
| |
621 | | debug!("[URC] WifiAPStationDisconnected");
622 | | true
623 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:658:25
|
658 | / Urc::NetworkError(_) => {
659 | | debug!("[URC] NetworkError");
660 | | true
661 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L609
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:609:25
|
609 | Urc::WifiAPDown(_) => {
| ^-----------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPDown(_) | Urc::NetworkError(_)`
| |
610 | | debug!("[URC] WifiAPDown");
611 | | true
612 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:658:25
|
658 | / Urc::NetworkError(_) => {
659 | | debug!("[URC] NetworkError");
660 | | true
661 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L605
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:605:25
|
605 | Urc::WifiAPUp(_) => {
| ^---------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPUp(_) | Urc::NetworkError(_)`
| |
606 | | debug!("[URC] WifiAPUp");
607 | | true
608 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:658:25
|
658 | / Urc::NetworkError(_) => {
659 | | debug!("[URC] NetworkError");
660 | | true
661 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L624
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:624:25
|
624 | Urc::EthernetLinkUp(_) => {
| ^---------------------
| |
| _________________________help: try merging the arm patterns: `Urc::EthernetLinkUp(_) | Urc::EthernetLinkDown(_)`
| |
625 | | debug!("[URC] EthernetLinkUp");
626 | | true
627 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:628:25
|
628 | / Urc::EthernetLinkDown(_) => {
629 | | debug!("[URC] EthernetLinkDown");
630 | | true
631 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L620
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:620:25
|
620 | Urc::WifiAPStationDisconnected(_) => {
| ^--------------------------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPStationDisconnected(_) | Urc::EthernetLinkDown(_)`
| |
621 | | debug!("[URC] WifiAPStationDisconnected");
622 | | true
623 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:628:25
|
628 | / Urc::EthernetLinkDown(_) => {
629 | | debug!("[URC] EthernetLinkDown");
630 | | true
631 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L609
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:609:25
|
609 | Urc::WifiAPDown(_) => {
| ^-----------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPDown(_) | Urc::EthernetLinkDown(_)`
| |
610 | | debug!("[URC] WifiAPDown");
611 | | true
612 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:628:25
|
628 | / Urc::EthernetLinkDown(_) => {
629 | | debug!("[URC] EthernetLinkDown");
630 | | true
631 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L605
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:605:25
|
605 | Urc::WifiAPUp(_) => {
| ^---------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPUp(_) | Urc::EthernetLinkDown(_)`
| |
606 | | debug!("[URC] WifiAPUp");
607 | | true
608 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:628:25
|
628 | / Urc::EthernetLinkDown(_) => {
629 | | debug!("[URC] EthernetLinkDown");
630 | | true
631 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L620
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:620:25
|
620 | Urc::WifiAPStationDisconnected(_) => {
| ^--------------------------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPStationDisconnected(_) | Urc::EthernetLinkUp(_)`
| |
621 | | debug!("[URC] WifiAPStationDisconnected");
622 | | true
623 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:624:25
|
624 | / Urc::EthernetLinkUp(_) => {
625 | | debug!("[URC] EthernetLinkUp");
626 | | true
627 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L609
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:609:25
|
609 | Urc::WifiAPDown(_) => {
| ^-----------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPDown(_) | Urc::EthernetLinkUp(_)`
| |
610 | | debug!("[URC] WifiAPDown");
611 | | true
612 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:624:25
|
624 | / Urc::EthernetLinkUp(_) => {
625 | | debug!("[URC] EthernetLinkUp");
626 | | true
627 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L605
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:605:25
|
605 | Urc::WifiAPUp(_) => {
| ^---------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPUp(_) | Urc::EthernetLinkUp(_)`
| |
606 | | debug!("[URC] WifiAPUp");
607 | | true
608 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:624:25
|
624 | / Urc::EthernetLinkUp(_) => {
625 | | debug!("[URC] EthernetLinkUp");
626 | | true
627 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L609
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:609:25
|
609 | Urc::WifiAPDown(_) => {
| ^-----------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPDown(_) | Urc::WifiAPStationDisconnected(_)`
| |
610 | | debug!("[URC] WifiAPDown");
611 | | true
612 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:620:25
|
620 | / Urc::WifiAPStationDisconnected(_) => {
621 | | debug!("[URC] WifiAPStationDisconnected");
622 | | true
623 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L605
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:605:25
|
605 | Urc::WifiAPUp(_) => {
| ^---------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPUp(_) | Urc::WifiAPStationDisconnected(_)`
| |
606 | | debug!("[URC] WifiAPUp");
607 | | true
608 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:620:25
|
620 | / Urc::WifiAPStationDisconnected(_) => {
621 | | debug!("[URC] WifiAPStationDisconnected");
622 | | true
623 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
|
this match arm has an identical body to another arm:
ublox-short-range/src/client.rs#L605
warning: this match arm has an identical body to another arm
--> ublox-short-range/src/client.rs:605:25
|
605 | Urc::WifiAPUp(_) => {
| ^---------------
| |
| _________________________help: try merging the arm patterns: `Urc::WifiAPUp(_) | Urc::WifiAPDown(_)`
| |
606 | | debug!("[URC] WifiAPUp");
607 | | true
608 | | }
| |_________________________^
|
= help: or try changing either arm body
note: other arm here
--> ublox-short-range/src/client.rs:609:25
|
609 | / Urc::WifiAPDown(_) => {
610 | | debug!("[URC] WifiAPDown");
611 | | true
612 | | }
| |_________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
= note: `-W clippy::match-same-arms` implied by `-W clippy::pedantic`
|
the function has a cognitive complexity of (45/25):
ublox-short-range/src/client.rs#L422
warning: the function has a cognitive complexity of (45/25)
--> ublox-short-range/src/client.rs:422:54
|
422 | self.client.try_read_urc_with::<EdmEvent, _>(|edm_urc, _| {
| ^^^^^^^^^^^^
|
= help: you could split it up into multiple smaller functions
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity
= note: `-W clippy::cognitive-complexity` implied by `-W clippy::nursery`
|
this function's return value is unnecessarily wrapped by `Result`:
ublox-short-range/src/client.rs#L410
warning: this function's return value is unnecessarily wrapped by `Result`
--> ublox-short-range/src/client.rs:410:5
|
410 | / fn handle_urc(&mut self) -> Result<bool, Error> {
411 | | let mut ran = false;
412 | | let socket_set = self.sockets.as_deref_mut();
413 | | let dns_state = &mut self.dns_state;
... |
848 | | Ok(ran)
849 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
410 | fn handle_urc(&mut self) -> bool {
| ~~~~
help: ...and then change returning expressions
|
848 | ran
|
|
this function has too many lines (387/100):
ublox-short-range/src/client.rs#L410
warning: this function has too many lines (387/100)
--> ublox-short-range/src/client.rs:410:5
|
410 | / fn handle_urc(&mut self) -> Result<bool, Error> {
411 | | let mut ran = false;
412 | | let socket_set = self.sockets.as_deref_mut();
413 | | let dns_state = &mut self.dns_state;
... |
848 | | Ok(ran)
849 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
= note: `-W clippy::too-many-lines` implied by `-W clippy::pedantic`
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/client.rs#L373
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/client.rs:373:5
|
373 | pub fn spin(&mut self) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/client.rs#L326
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/client.rs:326:5
|
326 | pub fn software_reset(&mut self) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/client.rs#L287
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/client.rs:287:5
|
287 | pub fn reset(&mut self) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/client.rs#L268
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/client.rs:268:5
|
268 | / pub fn retry_send<A, const LEN: usize>(
269 | | &mut self,
270 | | cmd: &A,
271 | | attempts: usize,
272 | | ) -> Result<A::Response, Error>
273 | | where
274 | | A: atat::AtatCmd<LEN>,
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/client.rs#L253
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/client.rs:253:5
|
253 | pub fn signal_strength(&mut self) -> Result<i16, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/client.rs#L248
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/client.rs:248:5
|
248 | pub fn firmware_version(&mut self) -> Result<FirmwareVersion, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
ublox-short-range/src/client.rs#L160
warning: docs for function returning `Result` missing `# Errors` section
--> ublox-short-range/src/client.rs:160:5
|
160 | pub fn init(&mut self) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
= note: `-W clippy::missing-errors-doc` implied by `-W clippy::pedantic`
|
unnecessary structure name repetition:
ublox-short-range/src/client.rs#L128
warning: unnecessary structure name repetition
--> ublox-short-range/src/client.rs:128:9
|
128 | UbloxClient {
| ^^^^^^^^^^^ help: use the applicable keyword: `Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
= note: `-W clippy::use-self` implied by `-W clippy::nursery`
|
item name ends with its containing module's name:
ublox-short-range/src/client.rs#L97
warning: item name ends with its containing module's name
--> ublox-short-range/src/client.rs:97:12
|
97 | pub struct UbloxClient<C, CLK, RST, const TIMER_HZ: u32, const N: usize, const L: usize>
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
= note: `-W clippy::module-name-repetitions` implied by `-W clippy::pedantic`
|
the following explicit lifetimes could be elided: 'a:
ublox-short-range/src/client.rs#L84
warning: the following explicit lifetimes could be elided: 'a
--> ublox-short-range/src/client.rs:84:1
|
84 | / pub fn new_socket_num<'a, const TIMER_HZ: u32, const N: usize, const L: usize>(
85 | | sockets: &'a SocketSet<TIMER_HZ, N, L>,
86 | | ) -> Result<u8, ()> {
| |___________________^
|
= 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: elide the lifetimes
|
84 ~ pub fn new_socket_num<const TIMER_HZ: u32, const N: usize, const L: usize>(
85 ~ sockets: &SocketSet<TIMER_HZ, N, L>,
|
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/client.rs#L75
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/client.rs:75:10
|
75 | #[derive(PartialEq, Clone, Default)]
| ^^^^^^^^^ 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
|
this function's return value is unnecessary:
ublox-short-range/src/client.rs#L66
warning: this function's return value is unnecessary
--> ublox-short-range/src/client.rs:66:5
|
66 | / pub fn insert(&mut self, ip: IpAddr, hostname: heapless::String<256>) -> Result<(), ()> {
67 | | self.table.insert(ip, hostname).ok();
68 | | Ok(())
69 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
= note: `-W clippy::unnecessary-wraps` implied by `-W clippy::pedantic`
help: remove the return type...
|
66 | pub fn insert(&mut self, ip: IpAddr, hostname: heapless::String<256>) -> Result<(), ()> {
| ~~~~~~~~~~~~~~
help: ...and then remove returned values
|
68 - Ok(())
68 +
|
|
this could be a `const fn`:
ublox-short-range/src/client.rs#L61
warning: this could be a `const fn`
--> ublox-short-range/src/client.rs:61:5
|
61 | / fn new() -> Self {
62 | | Self {
63 | | table: heapless::LinearMap::new(),
64 | | }
65 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
= note: `-W clippy::missing-const-for-fn` implied by `-W clippy::nursery`
|
you are deriving `PartialEq` and can implement `Eq`:
ublox-short-range/src/client.rs#L42
warning: you are deriving `PartialEq` and can implement `Eq`
--> ublox-short-range/src/client.rs:42:10
|
42 | #[derive(PartialEq, Copy, Clone)]
| ^^^^^^^^^ 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
= note: `-W clippy::derive-partial-eq-without-eq` implied by `-W clippy::nursery`
|
unneeded unit expression:
ublox-short-range/src/wifi/tcp_stack.rs#L218
warning: unneeded unit expression
--> ublox-short-range/src/wifi/tcp_stack.rs:218:33
|
218 | ... ()
| ^^ help: remove the final `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `-W clippy::unused-unit` implied by `-W clippy::all`
|
long literal lacking separators:
ublox-short-range/src/command/system/types.rs#L121
warning: long literal lacking separators
--> ublox-short-range/src/command/system/types.rs:121:16
|
121 | B5250000 = 5250000,
| ^^^^^^^ help: consider: `5_250_000`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal
|
long literal lacking separators:
ublox-short-range/src/command/system/types.rs#L120
warning: long literal lacking separators
--> ublox-short-range/src/command/system/types.rs:120:16
|
120 | B3000000 = 3000000,
| ^^^^^^^ help: consider: `3_000_000`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal
|
long literal lacking separators:
ublox-short-range/src/command/system/types.rs#L119
warning: long literal lacking separators
--> ublox-short-range/src/command/system/types.rs:119:15
|
119 | B921600 = 921600,
| ^^^^^^ help: consider: `921_600`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal
|
long literal lacking separators:
ublox-short-range/src/command/system/types.rs#L118
warning: long literal lacking separators
--> ublox-short-range/src/command/system/types.rs:118:15
|
118 | B460800 = 460800,
| ^^^^^^ help: consider: `460_800`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal
|
long literal lacking separators:
ublox-short-range/src/command/system/types.rs#L117
warning: long literal lacking separators
--> ublox-short-range/src/command/system/types.rs:117:15
|
117 | B250000 = 250000,
| ^^^^^^ help: consider: `250_000`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal
|
long literal lacking separators:
ublox-short-range/src/command/system/types.rs#L116
warning: long literal lacking separators
--> ublox-short-range/src/command/system/types.rs:116:15
|
116 | B230400 = 230400,
| ^^^^^^ help: consider: `230_400`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal
|
long literal lacking separators:
ublox-short-range/src/command/system/types.rs#L115
warning: long literal lacking separators
--> ublox-short-range/src/command/system/types.rs:115:15
|
115 | B115200 = 115200,
| ^^^^^^ help: consider: `115_200`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal
|
long literal lacking separators:
ublox-short-range/src/command/system/types.rs#L69
warning: long literal lacking separators
--> ublox-short-range/src/command/system/types.rs:69:15
|
69 | B460800 = 460800,
| ^^^^^^ help: consider: `460_800`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal
|
long literal lacking separators:
ublox-short-range/src/command/system/types.rs#L68
warning: long literal lacking separators
--> ublox-short-range/src/command/system/types.rs:68:15
|
68 | B230400 = 230400,
| ^^^^^^ help: consider: `230_400`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal
|
long literal lacking separators:
ublox-short-range/src/command/system/types.rs#L67
warning: long literal lacking separators
--> ublox-short-range/src/command/system/types.rs:67:15
|
67 | B115200 = 115200,
| ^^^^^^ help: consider: `115_200`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal
= note: `-W clippy::unreadable-literal` implied by `-W clippy::pedantic`
|
redundant else block:
ublox-short-range/src/command/custom_digest.rs#L34
warning: redundant else block
--> ublox-short-range/src/command/custom_digest.rs:34:24
|
34 | } else {
| ________________________^
35 | | return (DigestResult::None, len);
36 | | }
| |_________________^
|
= help: remove the `else` block and move the contents out
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else
= note: `-W clippy::redundant-else` implied by `-W clippy::pedantic`
|
found an empty line after a doc comment. Perhaps you need to use `//!` to make a comment on a module, remove the empty line, or make a regular comment with `//`?:
ublox-short-range/src/command/ping/types.rs#L25
warning: found an empty line after a doc comment. Perhaps you need to use `//!` to make a comment on a module, remove the empty line, or make a regular comment with `//`?
--> ublox-short-range/src/command/ping/types.rs:25:1
|
25 | / /// - Default value: 1000
26 | | // pub type Inteval = u16;
27 | |
28 | | #[derive(Debug, PartialEq, Clone, Copy, AtatEnum, defmt::Format)]
29 | | #[repr(u8)]
30 | | pub enum PingError {
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
|
found an empty line after a doc comment. Perhaps you need to use `//!` to make a comment on a module, remove the empty line, or make a regular comment with `//`?:
ublox-short-range/src/command/edm/types.rs#L6
warning: found an empty line after a doc comment. Perhaps you need to use `//!` to make a comment on a module, remove the empty line, or make a regular comment with `//`?
--> ublox-short-range/src/command/edm/types.rs:6:1
|
6 | / /// Start byte, Length: u16, Id+Type: u16, Endbyte
7 | | // type EdmAtCmdOverhead = (u8, u16, u16, u8);
8 | |
9 | | #[derive(
... |
23 | | )]
24 | | pub struct ChannelId(pub u8);
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= note: `-W clippy::empty-line-after-doc-comments` implied by `-W clippy::nursery`
|