Remove RefCell from ResponseSlot (#259)
#569
Annotations
239 warnings
|
Cancel previous runs
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: styfle/cancel-workflow-action@0.4.1. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Rustfmt
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions-rs/cargo@v1, actions-rs/toolchain@v1, actions/checkout@v2. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/urc.rs#L53
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/urc.rs:53:26
|
53 | let digest_arm = if let Some(parse_fn) = parse {
| __________________________^
54 | | quote! {
55 | | #parse_fn(&#code[..]),
... |
61 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
help: try
|
53 ~ let digest_arm = parse.map_or_else(|| quote! {
54 + atat::digest::parser::urc_helper(&#code[..]),
55 + }, |parse_fn| quote! {
56 + #parse_fn(&#code[..]),
57 ~ });
|
|
|
usage of wildcard import:
examples/src/common/general/mod.rs#L6
warning: usage of wildcard import
--> examples/src/common/general/mod.rs:6:5
|
6 | use responses::*;
| ^^^^^^^^^^^^ help: try: `responses::{ManufacturerId, ModelId, SoftwareVersion, WifiMac}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#wildcard_imports
= note: `-W clippy::wildcard-imports` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::wildcard_imports)]`
|
|
multiple versions for dependency `nb`: 0.1.3, 1.1.0:
examples/src/lib.rs#L1
warning: multiple versions for dependency `nb`: 0.1.3, 1.1.0
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#multiple_crate_versions
|
|
multiple versions for dependency `embedded-hal`: 0.2.7, 1.0.0:
examples/src/lib.rs#L1
warning: multiple versions for dependency `embedded-hal`: 0.2.7, 1.0.0
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#multiple_crate_versions
= note: `-W clippy::multiple-crate-versions` implied by `-W clippy::cargo`
= help: to override `-W clippy::cargo` add `#[allow(clippy::multiple_crate_versions)]`
|
|
`iter` call on a collection with only one item:
atat_derive/src/helpers.rs#L55
warning: `iter` call on a collection with only one item
--> atat_derive/src/helpers.rs:55:17
|
55 | bounds: [trait_bound].iter().cloned().collect(),
| ^^^^^^^^^^^^^^^^^^^^ help: try: `std::iter::once(&trait_bound)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#iter_on_single_items
= note: `-W clippy::iter-on-single-items` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::iter_on_single_items)]`
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/cmd.rs#L74
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/cmd.rs:74:34
|
74 | let reattempt_on_parse_err = match reattempt_on_parse_err {
| __________________________________^
75 | | Some(reattempt_on_parse_err) => {
76 | | quote! {
77 | | const REATTEMPT_ON_PARSE_ERR: bool = #reattempt_on_parse_err;
... |
80 | | None => quote! {},
81 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
help: try
|
74 ~ let reattempt_on_parse_err = reattempt_on_parse_err.map_or_else(|| quote! {}, |reattempt_on_parse_err| quote! {
75 + const REATTEMPT_ON_PARSE_ERR: bool = #reattempt_on_parse_err;
76 ~ });
|
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/cmd.rs#L65
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/cmd.rs:65:20
|
65 | let response = match response_code {
| ____________________^
66 | | Some(is_resp) => {
67 | | quote! {
68 | | const EXPECTS_RESPONSE_CODE: bool = #is_resp;
... |
71 | | None => quote! {},
72 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
help: try
|
65 ~ let response = response_code.map_or_else(|| quote! {}, |is_resp| quote! {
66 + const EXPECTS_RESPONSE_CODE: bool = #is_resp;
67 ~ });
|
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/cmd.rs#L56
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/cmd.rs:56:20
|
56 | let attempts = match attempts {
| ____________________^
57 | | Some(attempts) => {
58 | | quote! {
59 | | const ATTEMPTS: u8 = #attempts;
... |
62 | | None => quote! {},
63 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
help: try
|
56 ~ let attempts = attempts.map_or_else(|| quote! {}, |attempts| quote! {
57 + const ATTEMPTS: u8 = #attempts;
58 ~ });
|
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/cmd.rs#L47
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/cmd.rs:47:21
|
47 | let abortable = match abortable {
| _____________________^
48 | | Some(abortable) => {
49 | | quote! {
50 | | const CAN_ABORT: bool = #abortable;
... |
53 | | None => quote! {},
54 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
help: try
|
47 ~ let abortable = abortable.map_or_else(|| quote! {}, |abortable| quote! {
48 + const CAN_ABORT: bool = #abortable;
49 ~ });
|
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/cmd.rs#L38
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/cmd.rs:38:19
|
38 | let timeout = match timeout_ms {
| ___________________^
39 | | Some(timeout_ms) => {
40 | | quote! {
41 | | const MAX_TIMEOUT_MS: u32 = #timeout_ms;
... |
44 | | None => quote! {},
45 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
= note: `-W clippy::option-if-let-else` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::option_if_let_else)]`
help: try
|
38 ~ let timeout = timeout_ms.map_or_else(|| quote! {}, |timeout_ms| quote! {
39 + const MAX_TIMEOUT_MS: u32 = #timeout_ms;
40 ~ });
|
|
|
function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique:
atat/src/config.rs#L13
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> atat/src/config.rs:13:5
|
8 | #[derive(Debug, Copy, Clone, PartialEq, Eq)]
| --------- in this derive macro expansion
...
13 | pub(crate) get_response_timeout: GetTimeout,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
= note: `#[warn(unpredictable_function_pointer_comparisons)]` on by default
|
|
this parameter is a mutable reference but is not used mutably:
atat/src/blocking/client.rs#L69
warning: this parameter is a mutable reference but is not used mutably
--> atat/src/blocking/client.rs:69:9
|
69 | &'guard mut self,
| ^^^^^^^^----^^^^
| |
| help: consider removing this `mut`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#needless_pass_by_ref_mut
|
|
this parameter is a mutable reference but is not used mutably:
atat/src/asynch/client.rs#L76
warning: this parameter is a mutable reference but is not used mutably
--> atat/src/asynch/client.rs:76:9
|
76 | &'guard mut self,
| ^^^^^^^^----^^^^
| |
| help: consider removing this `mut`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#needless_pass_by_ref_mut
= note: `-W clippy::needless-pass-by-ref-mut` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::needless_pass_by_ref_mut)]`
|
|
unnecessary boolean `not` operation:
atat/src/blocking/client.rs#L111
warning: unnecessary boolean `not` operation
--> atat/src/blocking/client.rs:111:9
|
111 | / if !Cmd::EXPECTS_RESPONSE_CODE {
112 | | cmd.parse(Ok(&[]))
113 | | } else {
114 | | let response = self.wait_response(Duration::from_millis(Cmd::MAX_TIMEOUT_MS.into()))?;
115 | | cmd.parse((&*response).into())
116 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#if_not_else
help: try
|
111 ~ if Cmd::EXPECTS_RESPONSE_CODE {
112 + let response = self.wait_response(Duration::from_millis(Cmd::MAX_TIMEOUT_MS.into()))?;
113 + cmd.parse((&*response).into())
114 + } else {
115 + cmd.parse(Ok(&[]))
116 + }
|
|
|
the following explicit lifetimes could be elided: 'guard:
atat/src/blocking/client.rs#L68
warning: the following explicit lifetimes could be elided: 'guard
--> atat/src/blocking/client.rs:68:22
|
68 | fn wait_response<'guard>(
| ^^^^^^
69 | &'guard mut self,
| ^^^^^^
70 | timeout: Duration,
71 | ) -> Result<ResponseSlotGuard<'guard, INGRESS_BUF_SIZE>, Error> {
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
68 ~ fn wait_response(
69 ~ &mut self,
70 | timeout: Duration,
71 ~ ) -> Result<ResponseSlotGuard<'_, INGRESS_BUF_SIZE>, Error> {
|
|
|
first doc comment paragraph is too long:
atat/src/blocking/client.rs#L11
warning: first doc comment paragraph is too long
--> atat/src/blocking/client.rs:11:1
|
11 | / /// Client responsible for handling send, receive and timeout from the
12 | | /// userfacing side. The client is decoupled from the ingress-manager through
13 | | /// some spsc queue consumers, where any received responses can be dequeued. The
14 | | /// Client also has an spsc producer, to allow signaling commands like
15 | | /// `reset` to the ingress-manager.
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#too_long_first_doc_paragraph
= note: `-W clippy::too-long-first-doc-paragraph` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::too_long_first_doc_paragraph)]`
|
|
future cannot be sent between threads safely:
atat/src/asynch/mod.rs#L43
warning: future cannot be sent between threads safely
--> atat/src/asynch/mod.rs:43:58
|
43 | async fn send<Cmd: AtatCmd>(&mut self, cmd: &Cmd) -> Result<Cmd::Response, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `send` is not `Send`
|
note: future is not `Send` as it awaits another future which is not `Send`
--> atat/src/asynch/mod.rs:44:9
|
44 | T::send(self, cmd).await
| ^^^^^^^^^^^^^^^^^^ await occurs here on type `impl futures::Future<Output = core::result::Result<<Cmd as traits::AtatCmd>::Response, error::Error>>`, which is not `Send`
= note: `impl futures::Future<Output = core::result::Result<<Cmd as traits::AtatCmd>::Response, error::Error>>` doesn't implement `core::marker::Send`
note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
--> atat/src/asynch/mod.rs:43:44
|
43 | async fn send<Cmd: AtatCmd>(&mut self, cmd: &Cmd) -> Result<Cmd::Response, Error> {
| ^^^ has type `&Cmd` which is not `Send`, because `Cmd` is not `Sync`
= note: `Cmd` doesn't implement `core::marker::Sync`
note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send`
--> atat/src/asynch/mod.rs:43:33
|
43 | async fn send<Cmd: AtatCmd>(&mut self, cmd: &Cmd) -> Result<Cmd::Response, Error> {
| ^^^^^^^^^ has type `&mut &mut T` which is not `Send`, because `&mut T` is not `Send`
= note: `T` doesn't implement `core::marker::Send`
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#future_not_send
|
|
unnecessary boolean `not` operation:
atat/src/asynch/simple_client.rs#L149
warning: unnecessary boolean `not` operation
--> atat/src/asynch/simple_client.rs:149:9
|
149 | / if !Cmd::EXPECTS_RESPONSE_CODE {
150 | | cmd.parse(Ok(&[]))
151 | | } else {
152 | | let response = embassy_time::with_timeout(
... |
159 | | cmd.parse((&response).into())
160 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#if_not_else
help: try
|
149 ~ if Cmd::EXPECTS_RESPONSE_CODE {
150 + let response = embassy_time::with_timeout(
151 + Duration::from_millis(Cmd::MAX_TIMEOUT_MS.into()),
152 + self.wait_response(),
153 + )
154 + .await
155 + .map_err(|_| Error::Timeout)??;
156 +
157 + cmd.parse((&response).into())
158 + } else {
159 + cmd.parse(Ok(&[]))
160 + }
|
|
|
future cannot be sent between threads safely:
atat/src/asynch/simple_client.rs#L145
warning: future cannot be sent between threads safely
--> atat/src/asynch/simple_client.rs:145:58
|
145 | async fn send<Cmd: AtatCmd>(&mut self, cmd: &Cmd) -> Result<Cmd::Response, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `send` is not `Send`
|
note: future is not `Send` as this value is used across an await
--> atat/src/asynch/simple_client.rs:148:32
|
145 | async fn send<Cmd: AtatCmd>(&mut self, cmd: &Cmd) -> Result<Cmd::Response, Error> {
| --- has type `&Cmd` which is not `Send`
...
148 | self.send_request(len).await?;
| ^^^^^ await occurs here, with `cmd` maybe used later
= note: `Cmd` doesn't implement `core::marker::Sync`
note: future is not `Send` as this value is used across an await
--> atat/src/asynch/simple_client.rs:148:32
|
145 | async fn send<Cmd: AtatCmd>(&mut self, cmd: &Cmd) -> Result<Cmd::Response, Error> {
| --------- has type `&mut asynch::simple_client::SimpleClient<'_, RW, D>` which is not `Send`
...
148 | self.send_request(len).await?;
| ^^^^^ await occurs here, with `&mut self` maybe used later
= note: `RW` doesn't implement `core::marker::Send`
note: future is not `Send` as this value is used across an await
--> atat/src/asynch/simple_client.rs:148:32
|
145 | async fn send<Cmd: AtatCmd>(&mut self, cmd: &Cmd) -> Result<Cmd::Response, Error> {
| --------- has type `&mut asynch::simple_client::SimpleClient<'_, RW, D>` which is not `Send`
...
148 | self.send_request(len).await?;
| ^^^^^ await occurs here, with `&mut self` maybe used later
= note: `D` doesn't implement `core::marker::Send`
note: future is not `Send` as it awaits another future which is not `Send`
--> atat/src/asynch/simple_client.rs:37:9
|
37 | with_timeout(self.config.tx_timeout, self.rw.write_all(&self.buf[..len]))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `embassy_time::timer::TimeoutFuture<impl futures::Future<Output = core::result::Result<(), <RW as embedded_io::ErrorType>::Error>>>`, which is not `Send`
= note: `impl futures::Future<Output = core::result::Result<(), <RW as embedded_io::ErrorType>::Error>>` doesn't implement `core::marker::Send`
note: future is not `Send` as it awaits another future which is not `Send`
--> atat/src/asynch/simple_client.rs:42:9
|
42 | with_timeout(self.config.flush_timeout, self.rw.flush())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `embassy_time::timer::TimeoutFuture<impl futures::Future<Output = core::result::Result<(), <RW as embedded_io::ErrorType>::Error>>>`, which is not `Send`
= note: `impl futures::Future<Output = core::result::Result<(), <RW as embedded_io::ErrorType>::Error>>` doesn't implement `core::marker::Send`
note: future is not `Send` as it awaits another future which is not `Send`
--> atat/src/asynch/simple_client.rs:53:19
|
53 | match self.rw.read(&mut self.buf[self.pos..]).await {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `impl futures::Future<Output = core::result::Result<usize, <RW as embedded_io::ErrorType>::Error>>`, which is not `Send`
= note: `impl futures::Future<Output = core::result::Result<usize, <RW as embedded_io::ErrorType>::Error>>` doesn't implement `core::marker::Send`
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#future_not_send
|
|
consider adding a `;` to the last statement for consistent formatting:
atat/src/asynch/simple_client.rs#L139
warning: consider adding a `;` to the last statement for consistent formatting
--> atat/src/asynch/simple_client.rs:139:13
|
139 | cooldown.await
| ^^^^^^^^^^^^^^ help: add a `;` here: `cooldown.await;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#semicolon_if_nothing_returned
|
|
consider adding a `;` to the last statement for consistent formatting:
atat/src/asynch/simple_client.rs#L92
warning: consider adding a `;` to the last statement for consistent formatting
--> atat/src/asynch/simple_client.rs:92:37
|
92 | ... debug!("Received OK ({}/{})", swallowed, self.pos)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `debug!("Received OK ({}/{})", swallowed, self.pos);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#semicolon_if_nothing_returned
|
|
unnecessary semicolon:
atat/src/asynch/simple_client.rs#L58
warning: unnecessary semicolon
--> atat/src/asynch/simple_client.rs:58:14
|
58 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#unnecessary_semicolon
= note: `-W clippy::unnecessary-semicolon` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::unnecessary_semicolon)]`
|
|
this could be a `const fn`:
atat/src/asynch/simple_client.rs#L16
warning: this could be a `const fn`
--> atat/src/asynch/simple_client.rs:16:5
|
16 | / pub fn new(rw: RW, digester: D, buf: &'a mut [u8], config: Config) -> Self {
17 | | Self {
18 | | rw,
19 | | digester,
... |
25 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#missing_const_for_fn
help: make the function `const`
|
16 | pub const fn new(rw: RW, digester: D, buf: &'a mut [u8], config: Config) -> Self {
| +++++
|
|
unnecessary boolean `not` operation:
atat/src/asynch/client.rs#L124
warning: unnecessary boolean `not` operation
--> atat/src/asynch/client.rs:124:9
|
124 | / if !Cmd::EXPECTS_RESPONSE_CODE {
125 | | cmd.parse(Ok(&[]))
126 | | } else {
127 | | let response = self
... |
130 | | cmd.parse((&*response).into())
131 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#if_not_else
= note: `-W clippy::if-not-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::if_not_else)]`
help: try
|
124 ~ if Cmd::EXPECTS_RESPONSE_CODE {
125 + let response = self
126 + .wait_response(Duration::from_millis(Cmd::MAX_TIMEOUT_MS.into()))
127 + .await?;
128 + cmd.parse((&*response).into())
129 + } else {
130 + cmd.parse(Ok(&[]))
131 + }
|
|
|
consider adding a `;` to the last statement for consistent formatting:
atat/src/asynch/client.rs#L115
warning: consider adding a `;` to the last statement for consistent formatting
--> atat/src/asynch/client.rs:115:13
|
115 | cooldown.await
| ^^^^^^^^^^^^^^ help: add a `;` here: `cooldown.await;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#semicolon_if_nothing_returned
|
|
matching over `()` is more explicit:
atat/src/asynch/client.rs#L97
warning: matching over `()` is more explicit
--> atat/src/asynch/client.rs:97:32
|
97 | Either::Right((_, fut)) => {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#ignored_unit_patterns
= note: `-W clippy::ignored-unit-patterns` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::ignored_unit_patterns)]`
|
|
future cannot be sent between threads safely:
atat/src/asynch/client.rs#L88
warning: future cannot be sent between threads safely
--> atat/src/asynch/client.rs:88:10
|
88 | ) -> Result<F::Output, TimeoutError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `with_timeout` is not `Send`
|
note: future is not `Send` as this value is used across an await
--> atat/src/asynch/client.rs:95:57
|
92 | pin_mut!(fut);
| ------------- has type `F` which is not `Send`
...
95 | fut = match select(fut, Timer::at(expires)).await {
| ^^^^^ await occurs here, with `mut $x` maybe used later
= note: `F` doesn't implement `core::marker::Send`
note: future is not `Send` as this value is used across an await
--> atat/src/asynch/client.rs:95:57
|
85 | &self,
| ----- has type `&asynch::client::Client<'_, W, INGRESS_BUF_SIZE>` which is not `Send`
...
95 | fut = match select(fut, Timer::at(expires)).await {
| ^^^^^ await occurs here, with `&self` maybe used later
= note: `W` doesn't implement `core::marker::Sync`
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#future_not_send
|
|
future cannot be sent between threads safely:
atat/src/asynch/client.rs#L78
warning: future cannot be sent between threads safely
--> atat/src/asynch/client.rs:78:10
|
78 | ) -> Result<ResponseSlotGuard<'guard, INGRESS_BUF_SIZE>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `wait_response` is not `Send`
|
note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send`
--> atat/src/asynch/client.rs:76:9
|
76 | &'guard mut self,
| ^^^^^^^^^^^^^^^^ has type `&mut asynch::client::Client<'a, W, INGRESS_BUF_SIZE>` which is not `Send`, because `asynch::client::Client<'a, W, INGRESS_BUF_SIZE>` is not `Send`
= note: `W` doesn't implement `core::marker::Send`
note: future is not `Send` as this value is used across an await
--> atat/src/asynch/client.rs:95:57
|
85 | &self,
| ----- has type `&asynch::client::Client<'_, W, INGRESS_BUF_SIZE>` which is not `Send`
...
95 | fut = match select(fut, Timer::at(expires)).await {
| ^^^^^ await occurs here, with `&self` maybe used later
= note: `W` doesn't implement `core::marker::Sync`
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#future_not_send
|
|
the following explicit lifetimes could be elided: 'guard:
atat/src/asynch/client.rs#L75
warning: the following explicit lifetimes could be elided: 'guard
--> atat/src/asynch/client.rs:75:28
|
75 | async fn wait_response<'guard>(
| ^^^^^^
76 | &'guard mut self,
| ^^^^^^
77 | timeout: Duration,
78 | ) -> Result<ResponseSlotGuard<'guard, INGRESS_BUF_SIZE>, Error> {
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
|
|
the following explicit lifetimes could be elided: 'a:
atat/src/asynch/client.rs#L44
warning: the following explicit lifetimes could be elided: 'a
--> atat/src/asynch/client.rs:44:6
|
44 | impl<'a, W: Write, const INGRESS_BUF_SIZE: usize> Client<'a, W, INGRESS_BUF_SIZE> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
44 - impl<'a, W: Write, const INGRESS_BUF_SIZE: usize> Client<'a, W, INGRESS_BUF_SIZE> {
44 + impl<W: Write, const INGRESS_BUF_SIZE: usize> Client<'_, W, INGRESS_BUF_SIZE> {
|
|
|
this could be a `const fn`:
atat/src/asynch/client.rs#L24
warning: this could be a `const fn`
--> atat/src/asynch/client.rs:24:5
|
24 | / pub fn new(
25 | | writer: W,
26 | | res_slot: &'a ResponseSlot<INGRESS_BUF_SIZE>,
27 | | buf: &'a mut [u8],
... |
37 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#missing_const_for_fn
= note: `-W clippy::missing-const-for-fn` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::missing_const_for_fn)]`
help: make the function `const`
|
24 | pub const fn new(
| +++++
|
|
this method could have a `#[must_use]` attribute:
atat/src/urc_channel.rs#L32
warning: this method could have a `#[must_use]` attribute
--> atat/src/urc_channel.rs:32:18
|
32 | pub const fn new() -> Self {
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#must_use_candidate
help: add the attribute
|
32 ~ #[must_use]
33 ~ pub const fn new() -> Self {
|
|
|
the following explicit lifetimes could be elided: 'a:
atat/src/response_slot.rs#L46
warning: the following explicit lifetimes could be elided: 'a
--> atat/src/response_slot.rs:46:20
|
46 | pub fn try_get<'a>(&'a self) -> Option<ResponseSlotGuard<'a, N>> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
46 - pub fn try_get<'a>(&'a self) -> Option<ResponseSlotGuard<'a, N>> {
46 + pub fn try_get(&self) -> Option<ResponseSlotGuard<'_, N>> {
|
|
|
docs for function which may panic missing `# Panics` section:
atat/src/response_slot.rs#L46
warning: docs for function which may panic missing `# Panics` section
--> atat/src/response_slot.rs:46:5
|
46 | pub fn try_get<'a>(&'a self) -> Option<ResponseSlotGuard<'a, N>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> atat/src/response_slot.rs:49:18
|
49 | Some(self.0.try_lock().unwrap())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#missing_panics_doc
|
|
the following explicit lifetimes could be elided: 'a:
atat/src/response_slot.rs#L38
warning: the following explicit lifetimes could be elided: 'a
--> atat/src/response_slot.rs:38:22
|
38 | pub async fn get<'a>(&'a self) -> ResponseSlotGuard<'a, N> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
|
|
docs for function which may panic missing `# Panics` section:
atat/src/response_slot.rs#L38
warning: docs for function which may panic missing `# Panics` section
--> atat/src/response_slot.rs:38:5
|
38 | pub async fn get<'a>(&'a self) -> ResponseSlotGuard<'a, N> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> atat/src/response_slot.rs:42:9
|
42 | self.0.try_lock().unwrap()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#missing_panics_doc
|
|
this method could have a `#[must_use]` attribute:
atat/src/response_slot.rs#L28
warning: this method could have a `#[must_use]` attribute
--> atat/src/response_slot.rs:28:18
|
28 | pub const fn new() -> Self {
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#must_use_candidate
help: add the attribute
|
28 ~ #[must_use]
29 ~ pub const fn new() -> Self {
|
|
|
this method could have a `#[must_use]` attribute:
atat/src/response.rs#L23
warning: this method could have a `#[must_use]` attribute
--> atat/src/response.rs:23:12
|
23 | pub fn ok(value: &[u8]) -> Self {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#must_use_candidate
help: add the attribute
|
23 ~ #[must_use]
24 ~ pub fn ok(value: &[u8]) -> Self {
|
|
|
docs for function which may panic missing `# Panics` section:
atat/src/response.rs#L23
warning: docs for function which may panic missing `# Panics` section
--> atat/src/response.rs:23:5
|
23 | pub fn ok(value: &[u8]) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> atat/src/response.rs:24:22
|
24 | Response::Ok(Vec::from_slice(value).unwrap())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#missing_panics_doc
|
|
you are deriving `PartialEq` and can implement `Eq`:
atat/src/response.rs#L4
warning: you are deriving `PartialEq` and can implement `Eq`
--> atat/src/response.rs:4:24
|
4 | #[derive(Debug, Clone, PartialEq)]
| ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#derive_partial_eq_without_eq
|
|
consider adding a `;` to the last statement for consistent formatting:
atat/src/ingress.rs#L286
warning: consider adding a `;` to the last statement for consistent formatting
--> atat/src/ingress.rs:286:33
|
286 | ... debug!("Received OK ({}/{})", swallowed, self.pos,)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `debug!("Received OK ({}/{})", swallowed, self.pos,);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#semicolon_if_nothing_returned
|
|
future cannot be sent between threads safely:
atat/src/ingress.rs#L238
warning: future cannot be sent between threads safely
--> atat/src/ingress.rs:238:47
|
238 | async fn advance(&mut self, commit: usize) {
| ^ future returned by `advance` is not `Send`
|
note: future is not `Send` as this value is used across an await
--> atat/src/ingress.rs:275:61
|
265 | if let Some(urc) = Urc::parse(urc_line) {
| -------------------- has type `core::option::Option<<Urc as traits::AtatUrc>::Response>` which is not `Send`
...
275 | self.urc_publisher.publish(urc).await;
| ^^^^^ await occurs here, with `Urc::parse(urc_line)` maybe used later
= note: `<Urc as traits::AtatUrc>::Response` doesn't implement `core::marker::Send`
note: future is not `Send` as this value is used across an await
--> atat/src/ingress.rs:275:61
|
238 | async fn advance(&mut self, commit: usize) {
| --------- has type `&mut ingress::Ingress<'_, D, Urc, RES_BUF_SIZE, URC_CAPACITY, URC_SUBSCRIBERS>` which is not `Send`
...
275 | self.urc_publisher.publish(urc).await;
| ^^^^^ await occurs here, with `&mut self` maybe used later
= note: `D` doesn't implement `core::marker::Send`
note: future is not `Send` as it awaits another future which is not `Send`
--> atat/src/ingress.rs:275:29
|
275 | ... self.urc_publisher.publish(urc).await;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `embassy_sync::pubsub::publisher::PublisherWaitFuture<'_, '_, embassy_sync::pubsub::PubSubChannel<embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex, <Urc as traits::AtatUrc>::Response, URC_CAPACITY, URC_SUBSCRIBERS, 1>, <Urc as traits::AtatUrc>::Response>`, which is not `Send`
= note: `<Urc as traits::AtatUrc>::Response` doesn't implement `core::marker::Sync`
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#future_not_send
= note: `-W clippy::future-not-send` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::future_not_send)]`
|
|
consider adding a `;` to the last statement for consistent formatting:
atat/src/ingress.rs#L202
warning: consider adding a `;` to the last statement for consistent formatting
--> atat/src/ingress.rs:202:33
|
202 | ... debug!("Received OK ({}/{})", swallowed, self.pos,)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `debug!("Received OK ({}/{})", swallowed, self.pos,);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#semicolon_if_nothing_returned
= note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::semicolon_if_nothing_returned)]`
|
|
docs for function which may panic missing `# Panics` section:
atat/src/ingress.rs#L125
warning: docs for function which may panic missing `# Panics` section
--> atat/src/ingress.rs:125:5
|
125 | / pub fn new(
126 | | digester: D,
127 | | buf: &'a mut [u8],
128 | | res_slot: &'a ResponseSlot<RES_BUF_SIZE>,
129 | | urc_channel: &'a UrcChannel<Urc, URC_CAPACITY, URC_SUBSCRIBERS>,
130 | | ) -> Self {
| |_____________^
|
note: first possible panic found here
--> atat/src/ingress.rs:136:28
|
136 | urc_publisher: urc_channel.0.publisher().unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#missing_panics_doc
= note: `-W clippy::missing-panics-doc` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::missing_panics_doc)]`
|
|
the following explicit lifetimes could be elided: 'a:
atat/src/helpers.rs#L5
warning: the following explicit lifetimes could be elided: 'a
--> atat/src/helpers.rs:5:6
|
5 | impl<'a> core::fmt::Debug for LossyStr<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
5 - impl<'a> core::fmt::Debug for LossyStr<'a> {
5 + impl core::fmt::Debug for LossyStr<'_> {
|
|
|
the following explicit lifetimes could be elided: 'a:
atat/src/error/mod.rs#L134
warning: the following explicit lifetimes could be elided: 'a
--> atat/src/error/mod.rs:134:6
|
134 | impl<'a> From<InternalError<'a>> for Error {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
134 - impl<'a> From<InternalError<'a>> for Error {
134 + impl From<InternalError<'_>> for Error {
|
|
|
these match arms have identical bodies:
atat/src/error/mod.rs#L121
warning: these match arms have identical bodies
--> atat/src/error/mod.rs:121:17
|
121 | ConnectionError::Unknown => embedded_io::ErrorKind::NotConnected,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122 | ConnectionError::NoCarrier => embedded_io::ErrorKind::ConnectionReset,
123 | ConnectionError::NoDialtone => embedded_io::ErrorKind::NotConnected,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is unintentional make the arms return different values
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#match_same_arms
= note: `-W clippy::match-same-arms` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::match_same_arms)]`
help: otherwise merge the patterns into a single arm
|
121 ~ ConnectionError::NoCarrier => embedded_io::ErrorKind::ConnectionReset,
122 ~ ConnectionError::Unknown | ConnectionError::NoDialtone => embedded_io::ErrorKind::NotConnected,
|
|
|
this function could have a `#[must_use]` attribute:
atat/src/digest.rs#L490
warning: this function could have a `#[must_use]` attribute
--> atat/src/digest.rs:490:12
|
490 | pub fn trim_start_ascii_space(x: &[u8]) -> &[u8] {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#must_use_candidate
= note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::must_use_candidate)]`
help: add the attribute
|
490 ~ #[must_use]
491 ~ pub fn trim_start_ascii_space(x: &[u8]) -> &[u8] {
|
|
|
this could be rewritten as `let...else`:
atat/src/digest.rs#L482
warning: this could be rewritten as `let...else`
--> atat/src/digest.rs:482:9
|
482 | / let from = match x.iter().position(|x| !x.is_ascii_whitespace()) {
483 | | Some(i) => i,
484 | | None => return &x[0..0],
485 | | };
| |__________^ help: consider writing: `let Some(from) = x.iter().position(|x| !x.is_ascii_whitespace()) else { return &x[0..0] };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#manual_let_else
= note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]`
|
|
item in documentation is missing backticks:
atat/src/digest.rs#L38
warning: item in documentation is missing backticks
--> atat/src/digest.rs:38:54
|
38 | /// - if a URC exists but is incomplete, return [ParseError::Incomplete]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_markdown
help: try
|
38 - /// - if a URC exists but is incomplete, return [ParseError::Incomplete]
38 + /// - if a URC exists but is incomplete, return [`ParseError::Incomplete`]
|
|
|
item in documentation is missing backticks:
atat/src/digest.rs#L37
warning: item in documentation is missing backticks
--> atat/src/digest.rs:37:37
|
37 | /// - if no URC exists, return [ParseError::NoMatch]
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_markdown
= note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]`
help: try
|
37 - /// - if no URC exists, return [ParseError::NoMatch]
37 + /// - if no URC exists, return [`ParseError::NoMatch`]
|
|
|
the following explicit lifetimes could be elided: 'a:
atat/src/fmt.rs#L263
warning: the following explicit lifetimes could be elided: 'a
--> atat/src/fmt.rs:263:6
|
263 | impl<'a> LowerHex for Bytes<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
263 - impl<'a> LowerHex for Bytes<'a> {
263 + impl LowerHex for Bytes<'_> {
|
|
|
the following explicit lifetimes could be elided: 'a:
atat/src/fmt.rs#L257
warning: the following explicit lifetimes could be elided: 'a
--> atat/src/fmt.rs:257:6
|
257 | impl<'a> Display for Bytes<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
257 - impl<'a> Display for Bytes<'a> {
257 + impl Display for Bytes<'_> {
|
|
|
this parameter is a mutable reference but is not used mutably:
serde_at/src/de/mod.rs#L238
warning: this parameter is a mutable reference but is not used mutably
--> serde_at/src/de/mod.rs:238:13
|
238 | fn peek(&mut self) -> Option<u8> {
| ^----^^^^
| |
| help: consider removing this `mut`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#needless_pass_by_ref_mut
= note: `-W clippy::needless-pass-by-ref-mut` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::needless_pass_by_ref_mut)]`
|
|
reference as raw pointer:
serde_at/src/lib.rs#L43
warning: reference as raw pointer
--> serde_at/src/lib.rs:43:17
|
43 | unsafe { &*(slice as *const [MaybeUninit<T>] as *const [T]) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<[MaybeUninit<T>]>(slice)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#ref_as_ptr
= note: `-W clippy::ref-as-ptr` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::ref_as_ptr)]`
|
|
unnecessary boolean `not` operation:
serde_at/src/ser/mod.rs#L435
warning: unnecessary boolean `not` operation
--> serde_at/src/ser/mod.rs:435:26
|
435 | let ser_struct = if !self.nested_struct {
| __________________________^
436 | | // all calls to serialize_struct after this one will be nested structs
437 | | self.nested_struct = true;
438 | | self.extend_from_slice(self.options.cmd_prefix.as_bytes())?;
... |
442 | | SerializeStruct::new(self, true)
443 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#if_not_else
= note: `-W clippy::if-not-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::if_not_else)]`
help: try
|
435 ~ let ser_struct = if self.nested_struct {
436 + SerializeStruct::new(self, true)
437 + } else {
438 + // all calls to serialize_struct after this one will be nested structs
439 + self.nested_struct = true;
440 + self.extend_from_slice(self.options.cmd_prefix.as_bytes())?;
441 + self.extend_from_slice(self.cmd.as_bytes())?;
442 + SerializeStruct::new(self, false)
443 ~ };
|
|
|
casting `i64` to `u64` may lose the sign of the value:
serde_at/src/ser/mod.rs#L152
warning: casting `i64` to `u64` may lose the sign of the value
--> serde_at/src/ser/mod.rs:152:21
|
152 | (false, v as $uxx)
| ^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `v.cast_unsigned()`
...
263 | serialize_signed!(self, 20, v, i64, u64)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i64` to `u64` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i64` to `u64` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
263 | serialize_signed!(self, 20, v, i64, u64)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i32` to `u32` may lose the sign of the value:
serde_at/src/ser/mod.rs#L152
warning: casting `i32` to `u32` may lose the sign of the value
--> serde_at/src/ser/mod.rs:152:21
|
152 | (false, v as $uxx)
| ^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `v.cast_unsigned()`
...
258 | serialize_signed!(self, 11, v, i32, u32)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i32` to `u32` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i32` to `u32` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
258 | serialize_signed!(self, 11, v, i32, u32)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i16` to `u16` may lose the sign of the value:
serde_at/src/ser/mod.rs#L152
warning: casting `i16` to `u16` may lose the sign of the value
--> serde_at/src/ser/mod.rs:152:21
|
152 | (false, v as $uxx)
| ^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `v.cast_unsigned()`
...
253 | serialize_signed!(self, 6, v, i16, u16)
| --------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i16` to `u16` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i16` to `u16` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
253 | serialize_signed!(self, 6, v, i16, u16)
| --------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i8` to `u8` may lose the sign of the value:
serde_at/src/ser/mod.rs#L152
warning: casting `i8` to `u8` may lose the sign of the value
--> serde_at/src/ser/mod.rs:152:21
|
152 | (false, v as $uxx)
| ^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `v.cast_unsigned()`
...
248 | serialize_signed!(self, 4, v, i8, u8)
| ------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i8` to `u8` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i8` to `u8` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
248 | serialize_signed!(self, 4, v, i8, u8)
| ------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: `-W clippy::cast-sign-loss` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_sign_loss)]`
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/ser/mod.rs#L193
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/ser/mod.rs:193:6
|
193 | impl<'a> fmt::Write for FmtWrapper<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
193 - impl<'a> fmt::Write for FmtWrapper<'a> {
193 + impl fmt::Write for FmtWrapper<'_> {
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/ser/mod.rs#L39
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/ser/mod.rs:39:6
|
39 | impl<'a> Default for SerializeOptions<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
39 - impl<'a> Default for SerializeOptions<'a> {
39 + impl Default for SerializeOptions<'_> {
|
|
|
the following explicit lifetimes could be elided: 'a, 'b:
serde_at/src/ser/struct_.rs#L24
warning: the following explicit lifetimes could be elided: 'a, 'b
--> serde_at/src/ser/struct_.rs:24:6
|
24 | impl<'a, 'b> ser::SerializeStruct for SerializeStruct<'a, 'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
24 - impl<'a, 'b> ser::SerializeStruct for SerializeStruct<'a, 'b> {
24 + impl ser::SerializeStruct for SerializeStruct<'_, '_> {
|
|
|
the following explicit lifetimes could be elided: 'a, 'b:
serde_at/src/ser/enum_.rs#L48
warning: the following explicit lifetimes could be elided: 'a, 'b
--> serde_at/src/ser/enum_.rs:48:6
|
48 | impl<'a, 'b> ser::SerializeStructVariant for SerializeStructVariant<'a, 'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
48 - impl<'a, 'b> ser::SerializeStructVariant for SerializeStructVariant<'a, 'b> {
48 + impl ser::SerializeStructVariant for SerializeStructVariant<'_, '_> {
|
|
|
the following explicit lifetimes could be elided: 'a, 'b:
serde_at/src/ser/enum_.rs#L15
warning: the following explicit lifetimes could be elided: 'a, 'b
--> serde_at/src/ser/enum_.rs:15:6
|
15 | impl<'a, 'b> ser::SerializeTupleVariant for SerializeTupleVariant<'a, 'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
15 - impl<'a, 'b> ser::SerializeTupleVariant for SerializeTupleVariant<'a, 'b> {
15 + impl ser::SerializeTupleVariant for SerializeTupleVariant<'_, '_> {
|
|
|
used underscore-prefixed item:
serde_at/src/de/mod.rs#L754
warning: used underscore-prefixed item
--> serde_at/src/de/mod.rs:754:5
|
754 | _from_slice(v).map_err(|error| {
| ^^^^^^^^^^^^^^
|
note: item is defined here
--> serde_at/src/de/mod.rs:743:5
|
743 | / fn _from_slice<'a, T>(v: &'a [u8]) -> Result<T>
744 | | where
745 | | T: de::Deserialize<'a>,
| |_______________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#used_underscore_items
= note: `-W clippy::used-underscore-items` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::used_underscore_items)]`
|
|
item in documentation is missing backticks:
serde_at/src/de/mod.rs#L572
warning: item in documentation is missing backticks
--> serde_at/src/de/mod.rs:572:52
|
572 | /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_markdown
help: try
|
572 - /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
572 + /// deserialize_tuple is (mis)used for parsing `LengthDelimited` types.
|
|
|
item in documentation is missing backticks:
serde_at/src/de/mod.rs#L572
warning: item in documentation is missing backticks
--> serde_at/src/de/mod.rs:572:9
|
572 | /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_markdown
= note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]`
help: try
|
572 - /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
572 + /// `deserialize_tuple` is (mis)used for parsing LengthDelimited types.
|
|
|
casts from `u8` to `u128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
435 | deserialize_unsigned!(self, visitor, u128, visit_u128)
| ------------------------------------------------------ in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
casts from `u8` to `u128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
435 | deserialize_unsigned!(self, visitor, u128, visit_u128)
| ------------------------------------------------------ in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
casts from `u8` to `u64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
428 | deserialize_unsigned!(self, visitor, u64, visit_u64)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
casts from `u8` to `u64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
428 | deserialize_unsigned!(self, visitor, u64, visit_u64)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
casts from `u8` to `u32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
421 | deserialize_unsigned!(self, visitor, u32, visit_u32)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
casts from `u8` to `u32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
421 | deserialize_unsigned!(self, visitor, u32, visit_u32)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
casts from `u8` to `u16` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u16` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
414 | deserialize_unsigned!(self, visitor, u16, visit_u16)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
casts from `u8` to `u16` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u16` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
414 | deserialize_unsigned!(self, visitor, u16, visit_u16)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
casts from `u8` to `i128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
400 | deserialize_signed!(self, visitor, i128, visit_i128)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
casts from `u8` to `i128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L294
warning: casts from `u8` to `i128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^
...
400 | deserialize_signed!(self, visitor, i128, visit_i128)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
294 - let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
294 + let mut number = $ixx::from(c - b'0') * if signed { -1 } else { 1 };
|
|
|
casts from `u8` to `i64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
393 | deserialize_signed!(self, visitor, i64, visit_i64)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
casts from `u8` to `i64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L294
warning: casts from `u8` to `i64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^
...
393 | deserialize_signed!(self, visitor, i64, visit_i64)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
294 - let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
294 + let mut number = $ixx::from(c - b'0') * if signed { -1 } else { 1 };
|
|
|
casts from `u8` to `i32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
386 | deserialize_signed!(self, visitor, i32, visit_i32)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
casts from `u8` to `i32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L294
warning: casts from `u8` to `i32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^
...
386 | deserialize_signed!(self, visitor, i32, visit_i32)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
294 - let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
294 + let mut number = $ixx::from(c - b'0') * if signed { -1 } else { 1 };
|
|
|
casts from `u8` to `i16` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i16` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
379 | deserialize_signed!(self, visitor, i16, visit_i16)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
casts from `u8` to `i16` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L294
warning: casts from `u8` to `i16` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^
...
379 | deserialize_signed!(self, visitor, i16, visit_i16)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: `-W clippy::cast-lossless` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_lossless)]`
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
294 - let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
294 + let mut number = $ixx::from(c - b'0') * if signed { -1 } else { 1 };
|
|
|
casting `u8` to `i8` may wrap around the value:
serde_at/src/de/mod.rs#L302
warning: casting `u8` to `i8` may wrap around the value
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `(c - b'0').cast_signed()`
...
372 | deserialize_signed!(self, visitor, i8, visit_i8)
| ------------------------------------------------ in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_possible_wrap
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
called `.map() == Some()`:
serde_at/src/de/mod.rs#L197
warning: called `.map() == Some()`
--> serde_at/src/de/mod.rs:197:12
|
197 | if self
| ____________^
198 | | .parse_whitespace()
199 | | .map(|c| matches!(c, b'+' | b'#' | b'$' | b'&' | b'%'))
200 | | == Some(true)
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#manual_is_variant_and
= note: `-W clippy::manual-is-variant-and` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_is_variant_and)]`
help: use
|
197 ~ if self
198 + .parse_whitespace().is_some_and(|c| ..)
|
|
|
unnecessary semicolon:
serde_at/src/de/seq.rs#L56
warning: unnecessary semicolon
--> serde_at/src/de/seq.rs:56:10
|
56 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#unnecessary_semicolon
= note: `-W clippy::unnecessary-semicolon` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::unnecessary_semicolon)]`
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/de/seq.rs#L25
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/de/seq.rs:25:6
|
25 | impl<'a, 'de> de::SeqAccess<'de> for SeqAccess<'a, 'de> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
25 - impl<'a, 'de> de::SeqAccess<'de> for SeqAccess<'a, 'de> {
25 + impl<'de> de::SeqAccess<'de> for SeqAccess<'_, 'de> {
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/de/map.rs#L17
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/de/map.rs:17:6
|
17 | impl<'a, 'de> de::MapAccess<'de> for MapAccess<'a, 'de> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
17 - impl<'a, 'de> de::MapAccess<'de> for MapAccess<'a, 'de> {
17 + impl<'de> de::MapAccess<'de> for MapAccess<'_, 'de> {
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/de/enum_.rs#L28
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/de/enum_.rs:28:11
|
28 | impl<'de, 'a> de::VariantAccess<'de> for VariantAccess<'a, 'de> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
28 - impl<'de, 'a> de::VariantAccess<'de> for VariantAccess<'a, 'de> {
28 + impl<'de> de::VariantAccess<'de> for VariantAccess<'_, 'de> {
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/de/enum_.rs#L15
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/de/enum_.rs:15:6
|
15 | impl<'a, 'de> de::EnumAccess<'de> for VariantAccess<'a, 'de> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
= note: `-W clippy::elidable-lifetime-names` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::elidable_lifetime_names)]`
help: elide the lifetimes
|
15 - impl<'a, 'de> de::EnumAccess<'de> for VariantAccess<'a, 'de> {
15 + impl<'de> de::EnumAccess<'de> for VariantAccess<'_, 'de> {
|
|
|
lint `clippy::empty_enum` has been renamed to `clippy::empty_enums`:
serde_at/src/ser/mod.rs#L518
warning: lint `clippy::empty_enum` has been renamed to `clippy::empty_enums`
--> serde_at/src/ser/mod.rs:518:9
|
518 | #[allow(clippy::empty_enum)]
| ^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::empty_enums`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
|
|
`iter` call on a collection with only one item:
atat_derive/src/helpers.rs#L55
warning: `iter` call on a collection with only one item
--> atat_derive/src/helpers.rs:55:17
|
55 | bounds: [trait_bound].iter().cloned().collect(),
| ^^^^^^^^^^^^^^^^^^^^ help: try: `std::iter::once(&trait_bound)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#iter_on_single_items
= note: `-W clippy::iter-on-single-items` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::iter_on_single_items)]`
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/cmd.rs#L108
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/cmd.rs:108:17
|
108 | let parse = if let Some(parse) = parse {
| _________________^
109 | | quote! {
110 | | #[inline]
111 | | fn parse(&self, res: Result<&[u8], atat::InternalError>) -> core::result::Result<Self::Response, atat::Error> {
... |
132 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
help: try
|
108 ~ let parse = parse.map_or_else(|| quote! {
109 + #[inline]
110 + fn parse(&self, res: Result<&[u8], atat::InternalError>) -> core::result::Result<Self::Response, atat::Error> {
111 + match res {
112 + Ok(resp) => atat::serde_at::from_slice::<#resp>(resp).map_err(|e| {
113 + atat::Error::Parse
114 + }),
115 + Err(e) => Err(e.into())
116 + }
117 + }
118 + }, |parse| quote! {
119 + #[inline]
120 + fn parse(&self, res: Result<&[u8], atat::InternalError>) -> core::result::Result<Self::Response, atat::Error> {
121 + match res {
122 + Ok(resp) => #parse(resp).map_err(|e| {
123 + atat::Error::Parse
124 + }),
125 + Err(e) => Err(e.into())
126 + }
127 + }
128 ~ });
|
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/cmd.rs#L74
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/cmd.rs:74:34
|
74 | let reattempt_on_parse_err = match reattempt_on_parse_err {
| __________________________________^
75 | | Some(reattempt_on_parse_err) => {
76 | | quote! {
77 | | const REATTEMPT_ON_PARSE_ERR: bool = #reattempt_on_parse_err;
... |
80 | | None => quote! {},
81 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
help: try
|
74 ~ let reattempt_on_parse_err = reattempt_on_parse_err.map_or_else(|| quote! {}, |reattempt_on_parse_err| quote! {
75 + const REATTEMPT_ON_PARSE_ERR: bool = #reattempt_on_parse_err;
76 ~ });
|
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/cmd.rs#L65
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/cmd.rs:65:20
|
65 | let response = match response_code {
| ____________________^
66 | | Some(is_resp) => {
67 | | quote! {
68 | | const EXPECTS_RESPONSE_CODE: bool = #is_resp;
... |
71 | | None => quote! {},
72 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
help: try
|
65 ~ let response = response_code.map_or_else(|| quote! {}, |is_resp| quote! {
66 + const EXPECTS_RESPONSE_CODE: bool = #is_resp;
67 ~ });
|
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/cmd.rs#L56
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/cmd.rs:56:20
|
56 | let attempts = match attempts {
| ____________________^
57 | | Some(attempts) => {
58 | | quote! {
59 | | const ATTEMPTS: u8 = #attempts;
... |
62 | | None => quote! {},
63 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
help: try
|
56 ~ let attempts = attempts.map_or_else(|| quote! {}, |attempts| quote! {
57 + const ATTEMPTS: u8 = #attempts;
58 ~ });
|
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/cmd.rs#L47
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/cmd.rs:47:21
|
47 | let abortable = match abortable {
| _____________________^
48 | | Some(abortable) => {
49 | | quote! {
50 | | const CAN_ABORT: bool = #abortable;
... |
53 | | None => quote! {},
54 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
help: try
|
47 ~ let abortable = abortable.map_or_else(|| quote! {}, |abortable| quote! {
48 + const CAN_ABORT: bool = #abortable;
49 ~ });
|
|
|
use Option::map_or_else instead of an if let/else:
atat_derive/src/cmd.rs#L38
warning: use Option::map_or_else instead of an if let/else
--> atat_derive/src/cmd.rs:38:19
|
38 | let timeout = match timeout_ms {
| ___________________^
39 | | Some(timeout_ms) => {
40 | | quote! {
41 | | const MAX_TIMEOUT_MS: u32 = #timeout_ms;
... |
44 | | None => quote! {},
45 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#option_if_let_else
= note: `-W clippy::option-if-let-else` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::option_if_let_else)]`
help: try
|
38 ~ let timeout = timeout_ms.map_or_else(|| quote! {}, |timeout_ms| quote! {
39 + const MAX_TIMEOUT_MS: u32 = #timeout_ms;
40 ~ });
|
|
|
this parameter is a mutable reference but is not used mutably:
serde_at/src/de/mod.rs#L238
warning: this parameter is a mutable reference but is not used mutably
--> serde_at/src/de/mod.rs:238:13
|
238 | fn peek(&mut self) -> Option<u8> {
| ^----^^^^
| |
| help: consider removing this `mut`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#needless_pass_by_ref_mut
= note: `-W clippy::needless-pass-by-ref-mut` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::needless_pass_by_ref_mut)]`
|
|
reference as raw pointer:
serde_at/src/lib.rs#L43
warning: reference as raw pointer
--> serde_at/src/lib.rs:43:17
|
43 | unsafe { &*(slice as *const [MaybeUninit<T>] as *const [T]) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<[MaybeUninit<T>]>(slice)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#ref_as_ptr
= note: `-W clippy::ref-as-ptr` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::ref_as_ptr)]`
|
|
unnecessary boolean `not` operation:
serde_at/src/ser/mod.rs#L435
warning: unnecessary boolean `not` operation
--> serde_at/src/ser/mod.rs:435:26
|
435 | let ser_struct = if !self.nested_struct {
| __________________________^
436 | | // all calls to serialize_struct after this one will be nested structs
437 | | self.nested_struct = true;
438 | | self.extend_from_slice(self.options.cmd_prefix.as_bytes())?;
... |
442 | | SerializeStruct::new(self, true)
443 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#if_not_else
= note: `-W clippy::if-not-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::if_not_else)]`
help: try
|
435 ~ let ser_struct = if self.nested_struct {
436 + SerializeStruct::new(self, true)
437 + } else {
438 + // all calls to serialize_struct after this one will be nested structs
439 + self.nested_struct = true;
440 + self.extend_from_slice(self.options.cmd_prefix.as_bytes())?;
441 + self.extend_from_slice(self.cmd.as_bytes())?;
442 + SerializeStruct::new(self, false)
443 ~ };
|
|
|
this parameter is a mutable reference but is not used mutably:
serde_at/src/de/mod.rs#L238
warning: this parameter is a mutable reference but is not used mutably
--> serde_at/src/de/mod.rs:238:13
|
238 | fn peek(&mut self) -> Option<u8> {
| ^----^^^^
| |
| help: consider removing this `mut`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#needless_pass_by_ref_mut
= note: `-W clippy::needless-pass-by-ref-mut` implied by `-W clippy::nursery`
= help: to override `-W clippy::nursery` add `#[allow(clippy::needless_pass_by_ref_mut)]`
|
|
reference as raw pointer:
serde_at/src/lib.rs#L43
warning: reference as raw pointer
--> serde_at/src/lib.rs:43:17
|
43 | unsafe { &*(slice as *const [MaybeUninit<T>] as *const [T]) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::from_ref::<[MaybeUninit<T>]>(slice)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#ref_as_ptr
= note: `-W clippy::ref-as-ptr` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::ref_as_ptr)]`
|
|
casting `i64` to `u64` may lose the sign of the value:
serde_at/src/ser/mod.rs#L152
warning: casting `i64` to `u64` may lose the sign of the value
--> serde_at/src/ser/mod.rs:152:21
|
152 | (false, v as $uxx)
| ^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `v.cast_unsigned()`
...
263 | serialize_signed!(self, 20, v, i64, u64)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i64` to `u64` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i64` to `u64` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
263 | serialize_signed!(self, 20, v, i64, u64)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i32` to `u32` may lose the sign of the value:
serde_at/src/ser/mod.rs#L152
warning: casting `i32` to `u32` may lose the sign of the value
--> serde_at/src/ser/mod.rs:152:21
|
152 | (false, v as $uxx)
| ^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `v.cast_unsigned()`
...
258 | serialize_signed!(self, 11, v, i32, u32)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i32` to `u32` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i32` to `u32` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
258 | serialize_signed!(self, 11, v, i32, u32)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i16` to `u16` may lose the sign of the value:
serde_at/src/ser/mod.rs#L152
warning: casting `i16` to `u16` may lose the sign of the value
--> serde_at/src/ser/mod.rs:152:21
|
152 | (false, v as $uxx)
| ^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `v.cast_unsigned()`
...
253 | serialize_signed!(self, 6, v, i16, u16)
| --------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i16` to `u16` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i16` to `u16` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
253 | serialize_signed!(self, 6, v, i16, u16)
| --------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i8` to `u8` may lose the sign of the value:
serde_at/src/ser/mod.rs#L152
warning: casting `i8` to `u8` may lose the sign of the value
--> serde_at/src/ser/mod.rs:152:21
|
152 | (false, v as $uxx)
| ^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `v.cast_unsigned()`
...
248 | serialize_signed!(self, 4, v, i8, u8)
| ------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i8` to `u8` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i8` to `u8` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
248 | serialize_signed!(self, 4, v, i8, u8)
| ------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: `-W clippy::cast-sign-loss` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_sign_loss)]`
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
unnecessary boolean `not` operation:
serde_at/src/ser/mod.rs#L435
warning: unnecessary boolean `not` operation
--> serde_at/src/ser/mod.rs:435:26
|
435 | let ser_struct = if !self.nested_struct {
| __________________________^
436 | | // all calls to serialize_struct after this one will be nested structs
437 | | self.nested_struct = true;
438 | | self.extend_from_slice(self.options.cmd_prefix.as_bytes())?;
... |
442 | | SerializeStruct::new(self, true)
443 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#if_not_else
= note: `-W clippy::if-not-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::if_not_else)]`
help: try
|
435 ~ let ser_struct = if self.nested_struct {
436 + SerializeStruct::new(self, true)
437 + } else {
438 + // all calls to serialize_struct after this one will be nested structs
439 + self.nested_struct = true;
440 + self.extend_from_slice(self.options.cmd_prefix.as_bytes())?;
441 + self.extend_from_slice(self.cmd.as_bytes())?;
442 + SerializeStruct::new(self, false)
443 ~ };
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/ser/mod.rs#L193
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/ser/mod.rs:193:6
|
193 | impl<'a> fmt::Write for FmtWrapper<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
193 - impl<'a> fmt::Write for FmtWrapper<'a> {
193 + impl fmt::Write for FmtWrapper<'_> {
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/ser/mod.rs#L39
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/ser/mod.rs:39:6
|
39 | impl<'a> Default for SerializeOptions<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
39 - impl<'a> Default for SerializeOptions<'a> {
39 + impl Default for SerializeOptions<'_> {
|
|
|
the following explicit lifetimes could be elided: 'a, 'b:
serde_at/src/ser/struct_.rs#L24
warning: the following explicit lifetimes could be elided: 'a, 'b
--> serde_at/src/ser/struct_.rs:24:6
|
24 | impl<'a, 'b> ser::SerializeStruct for SerializeStruct<'a, 'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
24 - impl<'a, 'b> ser::SerializeStruct for SerializeStruct<'a, 'b> {
24 + impl ser::SerializeStruct for SerializeStruct<'_, '_> {
|
|
|
the following explicit lifetimes could be elided: 'a, 'b:
serde_at/src/ser/enum_.rs#L48
warning: the following explicit lifetimes could be elided: 'a, 'b
--> serde_at/src/ser/enum_.rs:48:6
|
48 | impl<'a, 'b> ser::SerializeStructVariant for SerializeStructVariant<'a, 'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
48 - impl<'a, 'b> ser::SerializeStructVariant for SerializeStructVariant<'a, 'b> {
48 + impl ser::SerializeStructVariant for SerializeStructVariant<'_, '_> {
|
|
|
the following explicit lifetimes could be elided: 'a, 'b:
serde_at/src/ser/enum_.rs#L15
warning: the following explicit lifetimes could be elided: 'a, 'b
--> serde_at/src/ser/enum_.rs:15:6
|
15 | impl<'a, 'b> ser::SerializeTupleVariant for SerializeTupleVariant<'a, 'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
15 - impl<'a, 'b> ser::SerializeTupleVariant for SerializeTupleVariant<'a, 'b> {
15 + impl ser::SerializeTupleVariant for SerializeTupleVariant<'_, '_> {
|
|
|
used underscore-prefixed item:
serde_at/src/de/mod.rs#L754
warning: used underscore-prefixed item
--> serde_at/src/de/mod.rs:754:5
|
754 | _from_slice(v).map_err(|error| {
| ^^^^^^^^^^^^^^
|
note: item is defined here
--> serde_at/src/de/mod.rs:743:5
|
743 | / fn _from_slice<'a, T>(v: &'a [u8]) -> Result<T>
744 | | where
745 | | T: de::Deserialize<'a>,
| |_______________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#used_underscore_items
= note: `-W clippy::used-underscore-items` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::used_underscore_items)]`
|
|
casting `i64` to `u64` may lose the sign of the value:
serde_at/src/ser/mod.rs#L152
warning: casting `i64` to `u64` may lose the sign of the value
--> serde_at/src/ser/mod.rs:152:21
|
152 | (false, v as $uxx)
| ^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `v.cast_unsigned()`
...
263 | serialize_signed!(self, 20, v, i64, u64)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i64` to `u64` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i64` to `u64` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
263 | serialize_signed!(self, 20, v, i64, u64)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i32` to `u32` may lose the sign of the value:
serde_at/src/ser/mod.rs#L152
warning: casting `i32` to `u32` may lose the sign of the value
--> serde_at/src/ser/mod.rs:152:21
|
152 | (false, v as $uxx)
| ^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `v.cast_unsigned()`
...
258 | serialize_signed!(self, 11, v, i32, u32)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
item in documentation is missing backticks:
serde_at/src/de/mod.rs#L572
warning: item in documentation is missing backticks
--> serde_at/src/de/mod.rs:572:52
|
572 | /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_markdown
help: try
|
572 - /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
572 + /// deserialize_tuple is (mis)used for parsing `LengthDelimited` types.
|
|
|
item in documentation is missing backticks:
serde_at/src/de/mod.rs#L572
warning: item in documentation is missing backticks
--> serde_at/src/de/mod.rs:572:9
|
572 | /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_markdown
= note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]`
help: try
|
572 - /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
572 + /// `deserialize_tuple` is (mis)used for parsing LengthDelimited types.
|
|
|
casting `i32` to `u32` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i32` to `u32` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
258 | serialize_signed!(self, 11, v, i32, u32)
| ---------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i16` to `u16` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i16` to `u16` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
253 | serialize_signed!(self, 6, v, i16, u16)
| --------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i8` to `u8` may lose the sign of the value:
serde_at/src/ser/mod.rs#L152
warning: casting `i8` to `u8` may lose the sign of the value
--> serde_at/src/ser/mod.rs:152:21
|
152 | (false, v as $uxx)
| ^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `v.cast_unsigned()`
...
248 | serialize_signed!(self, 4, v, i8, u8)
| ------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `i8` to `u8` may lose the sign of the value:
serde_at/src/ser/mod.rs#L150
warning: casting `i8` to `u8` may lose the sign of the value
--> serde_at/src/ser/mod.rs:150:20
|
150 | (true, -v as $uxx)
| ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `(-v).cast_unsigned()`
...
248 | serialize_signed!(self, 4, v, i8, u8)
| ------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_sign_loss
= note: `-W clippy::cast-sign-loss` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_sign_loss)]`
= note: this warning originates in the macro `serialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casts from `u8` to `u128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
435 | deserialize_unsigned!(self, visitor, u128, visit_u128)
| ------------------------------------------------------ in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
casts from `u8` to `u128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
435 | deserialize_unsigned!(self, visitor, u128, visit_u128)
| ------------------------------------------------------ in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/ser/mod.rs#L193
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/ser/mod.rs:193:6
|
193 | impl<'a> fmt::Write for FmtWrapper<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
193 - impl<'a> fmt::Write for FmtWrapper<'a> {
193 + impl fmt::Write for FmtWrapper<'_> {
|
|
|
casts from `u8` to `u64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
428 | deserialize_unsigned!(self, visitor, u64, visit_u64)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
casts from `u8` to `u64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
428 | deserialize_unsigned!(self, visitor, u64, visit_u64)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
casts from `u8` to `u32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
421 | deserialize_unsigned!(self, visitor, u32, visit_u32)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/ser/mod.rs#L39
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/ser/mod.rs:39:6
|
39 | impl<'a> Default for SerializeOptions<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
39 - impl<'a> Default for SerializeOptions<'a> {
39 + impl Default for SerializeOptions<'_> {
|
|
|
casts from `u8` to `u32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
421 | deserialize_unsigned!(self, visitor, u32, visit_u32)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
casts from `u8` to `u16` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u16` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
414 | deserialize_unsigned!(self, visitor, u16, visit_u16)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
casts from `u8` to `u16` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u16` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
414 | deserialize_unsigned!(self, visitor, u16, visit_u16)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
casts from `u8` to `i128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
400 | deserialize_signed!(self, visitor, i128, visit_i128)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
the following explicit lifetimes could be elided: 'a, 'b:
serde_at/src/ser/struct_.rs#L24
warning: the following explicit lifetimes could be elided: 'a, 'b
--> serde_at/src/ser/struct_.rs:24:6
|
24 | impl<'a, 'b> ser::SerializeStruct for SerializeStruct<'a, 'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
24 - impl<'a, 'b> ser::SerializeStruct for SerializeStruct<'a, 'b> {
24 + impl ser::SerializeStruct for SerializeStruct<'_, '_> {
|
|
|
casts from `u8` to `i128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L294
warning: casts from `u8` to `i128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^
...
400 | deserialize_signed!(self, visitor, i128, visit_i128)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
294 - let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
294 + let mut number = $ixx::from(c - b'0') * if signed { -1 } else { 1 };
|
|
|
casts from `u8` to `i64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
393 | deserialize_signed!(self, visitor, i64, visit_i64)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
the following explicit lifetimes could be elided: 'a, 'b:
serde_at/src/ser/enum_.rs#L48
warning: the following explicit lifetimes could be elided: 'a, 'b
--> serde_at/src/ser/enum_.rs:48:6
|
48 | impl<'a, 'b> ser::SerializeStructVariant for SerializeStructVariant<'a, 'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
48 - impl<'a, 'b> ser::SerializeStructVariant for SerializeStructVariant<'a, 'b> {
48 + impl ser::SerializeStructVariant for SerializeStructVariant<'_, '_> {
|
|
|
the following explicit lifetimes could be elided: 'a, 'b:
serde_at/src/ser/enum_.rs#L15
warning: the following explicit lifetimes could be elided: 'a, 'b
--> serde_at/src/ser/enum_.rs:15:6
|
15 | impl<'a, 'b> ser::SerializeTupleVariant for SerializeTupleVariant<'a, 'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
15 - impl<'a, 'b> ser::SerializeTupleVariant for SerializeTupleVariant<'a, 'b> {
15 + impl ser::SerializeTupleVariant for SerializeTupleVariant<'_, '_> {
|
|
|
casts from `u8` to `i64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L294
warning: casts from `u8` to `i64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^
...
393 | deserialize_signed!(self, visitor, i64, visit_i64)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
294 - let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
294 + let mut number = $ixx::from(c - b'0') * if signed { -1 } else { 1 };
|
|
|
used underscore-prefixed item:
serde_at/src/de/mod.rs#L754
warning: used underscore-prefixed item
--> serde_at/src/de/mod.rs:754:5
|
754 | _from_slice(v).map_err(|error| {
| ^^^^^^^^^^^^^^
|
note: item is defined here
--> serde_at/src/de/mod.rs:743:5
|
743 | / fn _from_slice<'a, T>(v: &'a [u8]) -> Result<T>
744 | | where
745 | | T: de::Deserialize<'a>,
| |_______________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#used_underscore_items
= note: `-W clippy::used-underscore-items` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::used_underscore_items)]`
|
|
casts from `u8` to `i32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
386 | deserialize_signed!(self, visitor, i32, visit_i32)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
casts from `u8` to `i32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L294
warning: casts from `u8` to `i32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^
...
386 | deserialize_signed!(self, visitor, i32, visit_i32)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
294 - let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
294 + let mut number = $ixx::from(c - b'0') * if signed { -1 } else { 1 };
|
|
|
casts from `u8` to `i16` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i16` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
379 | deserialize_signed!(self, visitor, i16, visit_i16)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
casting `u8` to `i8` may wrap around the value:
serde_at/src/de/mod.rs#L302
warning: casting `u8` to `i8` may wrap around the value
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `(c - b'0').cast_signed()`
...
372 | deserialize_signed!(self, visitor, i8, visit_i8)
| ------------------------------------------------ in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_possible_wrap
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `u8` to `i8` may wrap around the value:
serde_at/src/de/mod.rs#L294
warning: casting `u8` to `i8` may wrap around the value
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `(c - b'0').cast_signed()`
...
372 | deserialize_signed!(self, visitor, i8, visit_i8)
| ------------------------------------------------ in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_possible_wrap
= note: `-W clippy::cast-possible-wrap` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_possible_wrap)]`
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
item in documentation is missing backticks:
serde_at/src/de/mod.rs#L572
warning: item in documentation is missing backticks
--> serde_at/src/de/mod.rs:572:52
|
572 | /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_markdown
help: try
|
572 - /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
572 + /// deserialize_tuple is (mis)used for parsing `LengthDelimited` types.
|
|
|
item in documentation is missing backticks:
serde_at/src/de/mod.rs#L572
warning: item in documentation is missing backticks
--> serde_at/src/de/mod.rs:572:9
|
572 | /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_markdown
= note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]`
help: try
|
572 - /// deserialize_tuple is (mis)used for parsing LengthDelimited types.
572 + /// `deserialize_tuple` is (mis)used for parsing LengthDelimited types.
|
|
|
called `.map() == Some()`:
serde_at/src/de/mod.rs#L197
warning: called `.map() == Some()`
--> serde_at/src/de/mod.rs:197:12
|
197 | if self
| ____________^
198 | | .parse_whitespace()
199 | | .map(|c| matches!(c, b'+' | b'#' | b'$' | b'&' | b'%'))
200 | | == Some(true)
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#manual_is_variant_and
= note: `-W clippy::manual-is-variant-and` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_is_variant_and)]`
help: use
|
197 ~ if self
198 + .parse_whitespace().is_some_and(|c| ..)
|
|
|
casts from `u8` to `u128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
435 | deserialize_unsigned!(self, visitor, u128, visit_u128)
| ------------------------------------------------------ in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
casts from `u8` to `u128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
435 | deserialize_unsigned!(self, visitor, u128, visit_u128)
| ------------------------------------------------------ in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
casts from `u8` to `u64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
428 | deserialize_unsigned!(self, visitor, u64, visit_u64)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
casts from `u8` to `u64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
428 | deserialize_unsigned!(self, visitor, u64, visit_u64)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
casts from `u8` to `u32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
421 | deserialize_unsigned!(self, visitor, u32, visit_u32)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
unnecessary semicolon:
serde_at/src/de/seq.rs#L56
warning: unnecessary semicolon
--> serde_at/src/de/seq.rs:56:10
|
56 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#unnecessary_semicolon
= note: `-W clippy::unnecessary-semicolon` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::unnecessary_semicolon)]`
|
|
casts from `u8` to `u32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
421 | deserialize_unsigned!(self, visitor, u32, visit_u32)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/de/seq.rs#L25
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/de/seq.rs:25:6
|
25 | impl<'a, 'de> de::SeqAccess<'de> for SeqAccess<'a, 'de> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
25 - impl<'a, 'de> de::SeqAccess<'de> for SeqAccess<'a, 'de> {
25 + impl<'de> de::SeqAccess<'de> for SeqAccess<'_, 'de> {
|
|
|
casts from `u8` to `u16` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L265
warning: casts from `u8` to `u16` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:265:46
|
265 | .checked_add((c - b'0') as $uxx)
| ^^^^^^^^^^^^^^^^^^
...
414 | deserialize_unsigned!(self, visitor, u16, visit_u16)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
265 - .checked_add((c - b'0') as $uxx)
265 + .checked_add($uxx::from(c - b'0'))
|
|
|
casts from `u8` to `u16` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L257
warning: casts from `u8` to `u16` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:257:34
|
257 | let mut number = (peek - b'0') as $uxx;
| ^^^^^^^^^^^^^^^^^^^^^
...
414 | deserialize_unsigned!(self, visitor, u16, visit_u16)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_unsigned` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$uxx::from` instead
|
257 - let mut number = (peek - b'0') as $uxx;
257 + let mut number = $uxx::from(peek - b'0');
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/de/map.rs#L17
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/de/map.rs:17:6
|
17 | impl<'a, 'de> de::MapAccess<'de> for MapAccess<'a, 'de> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
17 - impl<'a, 'de> de::MapAccess<'de> for MapAccess<'a, 'de> {
17 + impl<'de> de::MapAccess<'de> for MapAccess<'_, 'de> {
|
|
|
casts from `u8` to `i128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
400 | deserialize_signed!(self, visitor, i128, visit_i128)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/de/enum_.rs#L28
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/de/enum_.rs:28:11
|
28 | impl<'de, 'a> de::VariantAccess<'de> for VariantAccess<'a, 'de> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
28 - impl<'de, 'a> de::VariantAccess<'de> for VariantAccess<'a, 'de> {
28 + impl<'de> de::VariantAccess<'de> for VariantAccess<'_, 'de> {
|
|
|
casts from `u8` to `i128` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L294
warning: casts from `u8` to `i128` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^
...
400 | deserialize_signed!(self, visitor, i128, visit_i128)
| ---------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
294 - let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
294 + let mut number = $ixx::from(c - b'0') * if signed { -1 } else { 1 };
|
|
|
casts from `u8` to `i64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
393 | deserialize_signed!(self, visitor, i64, visit_i64)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
casts from `u8` to `i64` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L294
warning: casts from `u8` to `i64` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^
...
393 | deserialize_signed!(self, visitor, i64, visit_i64)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
294 - let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
294 + let mut number = $ixx::from(c - b'0') * if signed { -1 } else { 1 };
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/de/enum_.rs#L15
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/de/enum_.rs:15:6
|
15 | impl<'a, 'de> de::EnumAccess<'de> for VariantAccess<'a, 'de> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
= note: `-W clippy::elidable-lifetime-names` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::elidable_lifetime_names)]`
help: elide the lifetimes
|
15 - impl<'a, 'de> de::EnumAccess<'de> for VariantAccess<'a, 'de> {
15 + impl<'de> de::EnumAccess<'de> for VariantAccess<'_, 'de> {
|
|
|
casts from `u8` to `i32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
386 | deserialize_signed!(self, visitor, i32, visit_i32)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
casts from `u8` to `i32` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L294
warning: casts from `u8` to `i32` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^
...
386 | deserialize_signed!(self, visitor, i32, visit_i32)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
294 - let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
294 + let mut number = $ixx::from(c - b'0') * if signed { -1 } else { 1 };
|
|
|
casts from `u8` to `i16` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L302
warning: casts from `u8` to `i16` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^
...
379 | deserialize_signed!(self, visitor, i16, visit_i16)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
302 - .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
302 + .checked_add($ixx::from(c - b'0') * if signed { -1 } else { 1 })
|
|
|
casts from `u8` to `i16` can be expressed infallibly using `From`:
serde_at/src/de/mod.rs#L294
warning: casts from `u8` to `i16` can be expressed infallibly using `From`
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^
...
379 | deserialize_signed!(self, visitor, i16, visit_i16)
| -------------------------------------------------- in this macro invocation
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_lossless
= note: `-W clippy::cast-lossless` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_lossless)]`
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `$ixx::from` instead
|
294 - let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
294 + let mut number = $ixx::from(c - b'0') * if signed { -1 } else { 1 };
|
|
|
casting `u8` to `i8` may wrap around the value:
serde_at/src/de/mod.rs#L302
warning: casting `u8` to `i8` may wrap around the value
--> serde_at/src/de/mod.rs:302:46
|
302 | .checked_add((c - b'0') as $ixx * if signed { -1 } else { 1 })
| ^^^^^^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `(c - b'0').cast_signed()`
...
372 | deserialize_signed!(self, visitor, i8, visit_i8)
| ------------------------------------------------ in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_possible_wrap
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
casting `u8` to `i8` may wrap around the value:
serde_at/src/de/mod.rs#L294
warning: casting `u8` to `i8` may wrap around the value
--> serde_at/src/de/mod.rs:294:34
|
294 | let mut number = (c - b'0') as $ixx * if signed { -1 } else { 1 };
| ^^^^^^^^^^^^^^^^^^ help: if this is intentional, use `cast_signed()` instead: `(c - b'0').cast_signed()`
...
372 | deserialize_signed!(self, visitor, i8, visit_i8)
| ------------------------------------------------ in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#cast_possible_wrap
= note: `-W clippy::cast-possible-wrap` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_possible_wrap)]`
= note: this warning originates in the macro `deserialize_signed` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
called `.map() == Some()`:
serde_at/src/de/mod.rs#L197
warning: called `.map() == Some()`
--> serde_at/src/de/mod.rs:197:12
|
197 | if self
| ____________^
198 | | .parse_whitespace()
199 | | .map(|c| matches!(c, b'+' | b'#' | b'$' | b'&' | b'%'))
200 | | == Some(true)
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#manual_is_variant_and
= note: `-W clippy::manual-is-variant-and` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_is_variant_and)]`
help: use
|
197 ~ if self
198 + .parse_whitespace().is_some_and(|c| ..)
|
|
|
lint `clippy::empty_enum` has been renamed to `clippy::empty_enums`:
serde_at/src/ser/mod.rs#L518
warning: lint `clippy::empty_enum` has been renamed to `clippy::empty_enums`
--> serde_at/src/ser/mod.rs:518:9
|
518 | #[allow(clippy::empty_enum)]
| ^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::empty_enums`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/de/seq.rs#L25
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/de/seq.rs:25:6
|
25 | impl<'a, 'de> de::SeqAccess<'de> for SeqAccess<'a, 'de> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
25 - impl<'a, 'de> de::SeqAccess<'de> for SeqAccess<'a, 'de> {
25 + impl<'de> de::SeqAccess<'de> for SeqAccess<'_, 'de> {
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/de/map.rs#L17
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/de/map.rs:17:6
|
17 | impl<'a, 'de> de::MapAccess<'de> for MapAccess<'a, 'de> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
help: elide the lifetimes
|
17 - impl<'a, 'de> de::MapAccess<'de> for MapAccess<'a, 'de> {
17 + impl<'de> de::MapAccess<'de> for MapAccess<'_, 'de> {
|
|
|
the following explicit lifetimes could be elided: 'a:
serde_at/src/de/enum_.rs#L15
warning: the following explicit lifetimes could be elided: 'a
--> serde_at/src/de/enum_.rs:15:6
|
15 | impl<'a, 'de> de::EnumAccess<'de> for VariantAccess<'a, 'de> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#elidable_lifetime_names
= note: `-W clippy::elidable-lifetime-names` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::elidable_lifetime_names)]`
help: elide the lifetimes
|
15 - impl<'a, 'de> de::EnumAccess<'de> for VariantAccess<'a, 'de> {
15 + impl<'de> de::EnumAccess<'de> for VariantAccess<'_, 'de> {
|
|
|
lint `clippy::empty_enum` has been renamed to `clippy::empty_enums`:
serde_at/src/ser/mod.rs#L518
warning: lint `clippy::empty_enum` has been renamed to `clippy::empty_enums`
--> serde_at/src/ser/mod.rs:518:9
|
518 | #[allow(clippy::empty_enum)]
| ^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::empty_enums`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
|
|
Clippy
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions-rs/clippy-check@v1, actions-rs/toolchain@v1, actions/checkout@v2. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (x86_64-unknown-linux-gnu)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions-rs/cargo@v1, actions-rs/toolchain@v1, actions/checkout@v2. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Build (x86_64-unknown-linux-gnu)
`atat-examples` (bin "std-tokio") generated 1 warning
|
|
Build (x86_64-unknown-linux-gnu):
examples/src/bin/std-tokio.rs#L16
unused macro definition: `singleton`
|
|
Build (x86_64-unknown-linux-gnu)
`atat` (lib) generated 1 warning
|
|
Build (x86_64-unknown-linux-gnu):
atat/src/config.rs#L13
function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
|
|
Build (x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (x86_64-unknown-linux-gnu)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (x86_64-unknown-linux-gnu, derive)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions-rs/cargo@v1, actions-rs/toolchain@v1, actions/checkout@v2. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Build (x86_64-unknown-linux-gnu, derive)
`atat-examples` (bin "std-tokio") generated 1 warning
|
|
Build (x86_64-unknown-linux-gnu, derive):
examples/src/bin/std-tokio.rs#L16
unused macro definition: `singleton`
|
|
Build (x86_64-unknown-linux-gnu, derive)
`atat` (lib) generated 1 warning
|
|
Build (x86_64-unknown-linux-gnu, derive):
atat/src/config.rs#L13
function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
|
|
Build (x86_64-unknown-linux-gnu, derive)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (x86_64-unknown-linux-gnu, derive)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (x86_64-unknown-linux-gnu, derive)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (x86_64-unknown-linux-gnu, derive)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (thumbv6m-none-eabi, derive)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions-rs/cargo@v1, actions-rs/toolchain@v1, actions/checkout@v2. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Build (thumbv6m-none-eabi, derive)
`atat` (lib) generated 1 warning
|
|
Build (thumbv6m-none-eabi, derive):
atat/src/config.rs#L13
function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
|
|
Build (thumbv6m-none-eabi, derive)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (thumbv6m-none-eabi, derive)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (thumbv6m-none-eabi, derive)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (thumbv6m-none-eabi, derive)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Test
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions-rs/cargo@v1, actions-rs/toolchain@v1, actions/checkout@v2. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Test
`atat-examples` (bin "std-tokio" test) generated 1 warning
|
|
Test:
examples/src/bin/std-tokio.rs#L16
unused macro definition: `singleton`
|
|
Test
`atat` (lib) generated 1 warning
|
|
Test:
atat/src/config.rs#L13
function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
|
|
Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (thumbv6m-none-eabi)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions-rs/cargo@v1, actions-rs/toolchain@v1, actions/checkout@v2. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Build (thumbv6m-none-eabi)
`atat` (lib) generated 1 warning
|
|
Build (thumbv6m-none-eabi):
atat/src/config.rs#L13
function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
|
|
Build (thumbv6m-none-eabi)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (thumbv6m-none-eabi)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (thumbv6m-none-eabi)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
Build (thumbv6m-none-eabi)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|