[WIP] p2p: add AsyncSecretConnection
based on tokio
#2429
Annotations
5 errors and 2 warnings
[clippy] p2p/src/secret_connection.rs#L35:
p2p/src/secret_connection.rs#L35
error: item name ends with its containing module's name
--> p2p/src/secret_connection.rs:35:33
|
35 | pub use self::async_connection::AsyncSecretConnection;
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
= note: `-D clippy::module-name-repetitions` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::module_name_repetitions)]`
|
[clippy] p2p/src/secret_connection/async_connection.rs#L31:
p2p/src/secret_connection/async_connection.rs#L31
error: future cannot be sent between threads safely
--> p2p/src/secret_connection/async_connection.rs:31:5
|
31 | / pub async fn connect_tcp<A: ToSocketAddrs>(
32 | | addr: A,
33 | | local_privkey: ed25519_consensus::SigningKey,
34 | | protocol_version: Version,
35 | | ) -> Result<Self, Error> {
| |____________________________^ future returned by `connect_tcp` is not `Send`
|
note: captured value is not `Send`
--> p2p/src/secret_connection/async_connection.rs:32:9
|
32 | addr: A,
| ^^^^ has type `A` which is not `Send`
= note: `A` doesn't implement `std::marker::Send`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#future_not_send
= note: `-D clippy::future-not-send` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::future_not_send)]`
|
[clippy] p2p/src/secret_connection/async_connection.rs#L108:
p2p/src/secret_connection/async_connection.rs#L108
error: the following explicit lifetimes could be elided: 'a
--> p2p/src/secret_connection/async_connection.rs:108:25
|
108 | async fn read_chunk<'a>(&'a mut self) -> Result<Vec<u8>, Error> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `-D clippy::needless-lifetimes` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
|
[clippy] p2p/src/secret_connection/async_connection.rs#L147:
p2p/src/secret_connection/async_connection.rs#L147
error: docs for function which may panic missing `# Panics` section
--> p2p/src/secret_connection/async_connection.rs:147:5
|
147 | pub async fn write_all<'a>(&'a mut self, src: &'a [u8]) -> Result<usize, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> p2p/src/secret_connection/async_connection.rs:163:17
|
163 | n = n
| _________________^
164 | | .checked_add(chunk.len())
165 | | .expect("overflow when adding chunk lengths");
| |_____________________________________________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
= note: `-D clippy::missing-panics-doc` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::missing_panics_doc)]`
|
[clippy] p2p/src/secret_connection/async_connection.rs#L147:
p2p/src/secret_connection/async_connection.rs#L147
error: docs for function returning `Result` missing `# Errors` section
--> p2p/src/secret_connection/async_connection.rs:147:5
|
147 | pub async fn write_all<'a>(&'a mut self, src: &'a [u8]) -> Result<usize, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
= note: `-D clippy::missing-errors-doc` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::missing_errors_doc)]`
|
security_audit
The following actions use a deprecated Node.js version and will be forced to run on node20: rustsec/audit-check@v1.4.1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
security_audit
1 warnings found!
|