mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-12 01:21:21 +00:00
chore: enforce unreachable_pub
lint
The `unreachable_pub` lint makes us aware of uses of `pub` that are not actually reachable from the crate root. This is considered good because it means reading a `pub` somewhere means it is actually public API. Some of our crates are quite large and keeping their entire API surface in your head is difficult. We should strive for most items being `pub(crate)`. This lint helps us enforce that. Pull-Request: #3735.
This commit is contained in:
@ -26,7 +26,7 @@ use crate::{client, server};
|
||||
|
||||
const BUF: [u8; 1024] = [0; 1024];
|
||||
|
||||
pub async fn send_receive<S: AsyncRead + AsyncWrite + Unpin>(
|
||||
pub(crate) async fn send_receive<S: AsyncRead + AsyncWrite + Unpin>(
|
||||
params: client::RunParams,
|
||||
mut stream: S,
|
||||
) -> Result<client::RunTimers, std::io::Error> {
|
||||
@ -67,7 +67,7 @@ pub async fn send_receive<S: AsyncRead + AsyncWrite + Unpin>(
|
||||
})
|
||||
}
|
||||
|
||||
pub async fn receive_send<S: AsyncRead + AsyncWrite + Unpin>(
|
||||
pub(crate) async fn receive_send<S: AsyncRead + AsyncWrite + Unpin>(
|
||||
mut stream: S,
|
||||
) -> Result<server::RunStats, std::io::Error> {
|
||||
let to_send = {
|
||||
|
Reference in New Issue
Block a user