Skip to content

[WIP] p2p: add AsyncSecretConnection based on tokio #2589

[WIP] p2p: add AsyncSecretConnection based on tokio

[WIP] p2p: add AsyncSecretConnection based on tokio #2589

Triggered via pull request August 28, 2024 13:32
Status Success
Total duration 2m 51s
Artifacts

build.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

5 errors
[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#L148: p2p/src/secret_connection/async_connection.rs#L148
error: docs for function which may panic missing `# Panics` section --> p2p/src/secret_connection/async_connection.rs:148:5 | 148 | 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:164:17 | 164 | n = n | _________________^ 165 | | .checked_add(chunk.len()) 166 | | .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#L148: p2p/src/secret_connection/async_connection.rs#L148
error: docs for function returning `Result` missing `# Errors` section --> p2p/src/secret_connection/async_connection.rs:148:5 | 148 | 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)]`