Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(*): Add option for custom parse fn in AtatUrc #205

Merged
merged 1 commit into from
Apr 22, 2024

Add an optional parse fn to the at_urc field attribute of AtatUrc, th…

07e76e6
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

feature(*): Add option for custom parse fn in AtatUrc #205

Add an optional parse fn to the at_urc field attribute of AtatUrc, th…
07e76e6
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Apr 8, 2024 in 1s

clippy

80 warnings

Details

Results

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

Versions

  • rustc 1.77.1 (7cf61ebde 2024-03-27)
  • cargo 1.77.1 (e52e36006 2024-03-26)
  • clippy 0.1.77 (7cf61eb 2024-03-27)

Annotations

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

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of wildcard import

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

Check warning on line 1 in examples/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

multiple versions for dependency `nb`: 0.1.3, 1.1.0

warning: multiple versions for dependency `nb`: 0.1.3, 1.1.0
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions

Check warning on line 1 in examples/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

multiple versions for dependency `heapless`: 0.7.17, 0.8.0

warning: multiple versions for dependency `heapless`: 0.7.17, 0.8.0
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions

Check warning on line 1 in examples/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

multiple versions for dependency `hash32`: 0.2.1, 0.3.1

warning: multiple versions for dependency `hash32`: 0.2.1, 0.3.1
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions

Check warning on line 1 in examples/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

multiple versions for dependency `embedded-hal`: 0.2.7, 1.0.0

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/master/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)]`

Check warning on line 61 in atat_derive/src/urc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use Option::map_or_else instead of an if let/else

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[..]),
56 | |             }
...  |
60 | |             }
61 | |         };
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/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 ~             });
   |

Check warning on line 55 in atat_derive/src/helpers.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`iter` call on a collection with only one item

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/master/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)]`

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

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary boolean `not` operation

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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

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

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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'guard

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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary boolean `not` operation

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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

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

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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

future cannot be sent between threads safely

warning: future cannot be sent between threads safely
   --> atat/src/asynch/simple_client.rs:140:5
    |
140 |     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:143:32
    |
140 |     async fn send<Cmd: AtatCmd>(&mut self, cmd: &Cmd) -> Result<Cmd::Response, Error> {
    |                                            --- has type `&Cmd` which is not `Send`
...
143 |         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:143:32
    |
140 |     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`
...
143 |         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:143:32
    |
140 |     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`
...
143 |         self.send_request(len).await?;
    |                                ^^^^^ await occurs here, with `&mut self` maybe used later
    = note: `D` doesn't implement `core::marker::Send`
    = note: `impl futures::Future<Output = core::result::Result<(), <RW as embedded_io::ErrorType>::Error>>` doesn't implement `core::marker::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/master/index.html#future_not_send

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

See this annotation in the file changed.

@github-actions github-actions / clippy

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

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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

future cannot be sent between threads safely

warning: future cannot be sent between threads safely
   --> atat/src/asynch/simple_client.rs:132:5
    |
132 |     async fn wait_cooldown_timer(&mut self) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `wait_cooldown_timer` is not `Send`
    |
note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send`
   --> atat/src/asynch/simple_client.rs:132:34
    |
132 |     async fn wait_cooldown_timer(&mut self) {
    |                                  ^^^^^^^^^ has type `&mut asynch::simple_client::SimpleClient<'a, RW, D>` which is not `Send`, because `asynch::simple_client::SimpleClient<'a, RW, D>` is not `Send`
    = note: `RW` doesn't implement `core::marker::Send`
note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send`
   --> atat/src/asynch/simple_client.rs:132:34
    |
132 |     async fn wait_cooldown_timer(&mut self) {
    |                                  ^^^^^^^^^ has type `&mut asynch::simple_client::SimpleClient<'a, RW, D>` which is not `Send`, because `asynch::simple_client::SimpleClient<'a, RW, D>` is not `Send`
    = note: `D` doesn't implement `core::marker::Send`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#future_not_send

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

See this annotation in the file changed.

@github-actions github-actions / clippy

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

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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

future cannot be sent between threads safely

warning: future cannot be sent between threads safely
  --> atat/src/asynch/simple_client.rs:51:5
   |
51 |     async fn wait_response<'guard>(&'guard mut self) -> Result<Response<256>, Error> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `wait_response` is not `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`
note: future is not `Send` as this value is used across an await
  --> atat/src/asynch/simple_client.rs:53:59
   |
51 |     async fn wait_response<'guard>(&'guard mut self) -> Result<Response<256>, Error> {
   |                                    ---------------- has type `&mut asynch::simple_client::SimpleClient<'a, RW, D>` which is not `Send`
52 |         loop {
53 |             match self.rw.read(&mut self.buf[self.pos..]).await {
   |                                                           ^^^^^ await occurs here, with `&'guard 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:53:59
   |
51 |     async fn wait_response<'guard>(&'guard mut self) -> Result<Response<256>, Error> {
   |                                    ---------------- has type `&mut asynch::simple_client::SimpleClient<'a, RW, D>` which is not `Send`
52 |         loop {
53 |             match self.rw.read(&mut self.buf[self.pos..]).await {
   |                                                           ^^^^^ await occurs here, with `&'guard mut self` maybe used later
   = note: `D` doesn't implement `core::marker::Send`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#future_not_send

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

See this annotation in the file changed.

@github-actions github-actions / clippy

future cannot be sent between threads safely

warning: future cannot be sent between threads safely
  --> atat/src/asynch/simple_client.rs:27:5
   |
27 |     async fn send_request(&mut self, len: usize) -> Result<(), Error> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `send_request` is not `Send`
   |
note: future is not `Send` as this value is used across an await
  --> atat/src/asynch/simple_client.rs:34:36
   |
27 |     async fn send_request(&mut self, len: usize) -> Result<(), Error> {
   |                           --------- has type `&mut asynch::simple_client::SimpleClient<'a, RW, D>` which is not `Send`
...
34 |         self.wait_cooldown_timer().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:34:36
   |
27 |     async fn send_request(&mut self, len: usize) -> Result<(), Error> {
   |                           --------- has type `&mut asynch::simple_client::SimpleClient<'a, RW, D>` which is not `Send`
...
34 |         self.wait_cooldown_timer().await;
   |                                    ^^^^^ await occurs here, with `&mut self` maybe used later
   = note: `D` doesn't implement `core::marker::Send`
   = note: `impl futures::Future<Output = core::result::Result<(), <RW as embedded_io::ErrorType>::Error>>` doesn't implement `core::marker::Send`
   = note: `impl futures::Future<Output = core::result::Result<(), <RW as embedded_io::ErrorType>::Error>>` doesn't implement `core::marker::Send`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#future_not_send

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

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary boolean `not` operation

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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

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

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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

future cannot be sent between threads safely

warning: future cannot be sent between threads safely
   --> atat/src/asynch/client.rs:114:5
    |
114 |     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/client.rs:116:32
    |
114 |     async fn send<Cmd: AtatCmd>(&mut self, cmd: &Cmd) -> Result<Cmd::Response, Error> {
    |                                            --- has type `&Cmd` which is not `Send`
115 |         let len = cmd.write(&mut self.buf);
116 |         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/client.rs:116:32
    |
114 |     async fn send<Cmd: AtatCmd>(&mut self, cmd: &Cmd) -> Result<Cmd::Response, Error> {
    |                                 --------- has type `&mut asynch::client::Client<'_, W, INGRESS_BUF_SIZE>` which is not `Send`
115 |         let len = cmd.write(&mut self.buf);
116 |         self.send_request(len).await?;
    |                                ^^^^^ await occurs here, with `&mut self` maybe used later
    = note: `W` doesn't implement `core::marker::Send`
    = note: `impl futures::Future<Output = core::result::Result<(), <W as embedded_io::ErrorType>::Error>>` doesn't implement `core::marker::Send`
    = note: `impl futures::Future<Output = core::result::Result<(), <W as embedded_io::ErrorType>::Error>>` doesn't implement `core::marker::Send`
note: future is not `Send` as this value is used across an await
   --> atat/src/asynch/client.rs:88:57
    |
78  |         &self,
    |         ----- has type `&asynch::client::Client<'_, W, INGRESS_BUF_SIZE>` which is not `Send`
...
88  |             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/master/index.html#future_not_send

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

See this annotation in the file changed.

@github-actions github-actions / clippy

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

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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

future cannot be sent between threads safely

warning: future cannot be sent between threads safely
   --> atat/src/asynch/client.rs:106:5
    |
106 |     async fn wait_cooldown_timer(&mut self) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `wait_cooldown_timer` 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:106:34
    |
106 |     async fn wait_cooldown_timer(&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`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#future_not_send

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

See this annotation in the file changed.

@github-actions github-actions / clippy

matching over `()` is more explicit

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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

future cannot be sent between threads safely

warning: future cannot be sent between threads safely
  --> atat/src/asynch/client.rs:77:5
   |
77 | /     async fn with_timeout<F: Future>(
78 | |         &self,
79 | |         timeout: Duration,
80 | |         fut: F,
81 | |     ) -> 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:88:57
   |
85 |         pin_mut!(fut);
   |         ------------- has type `F` which is not `Send`
...
88 |             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:88:57
   |
78 |         &self,
   |         ----- has type `&asynch::client::Client<'_, W, INGRESS_BUF_SIZE>` which is not `Send`
...
88 |             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/master/index.html#future_not_send