mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-04 12:11:35 +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:
@ -36,7 +36,7 @@ use std::pin::Pin;
|
||||
use std::task::{Context, Poll};
|
||||
use std::time::Duration;
|
||||
|
||||
pub struct CopyFuture<S, D> {
|
||||
pub(crate) struct CopyFuture<S, D> {
|
||||
src: BufReader<S>,
|
||||
dst: BufReader<D>,
|
||||
|
||||
@ -46,7 +46,12 @@ pub struct CopyFuture<S, D> {
|
||||
}
|
||||
|
||||
impl<S: AsyncRead, D: AsyncRead> CopyFuture<S, D> {
|
||||
pub fn new(src: S, dst: D, max_circuit_duration: Duration, max_circuit_bytes: u64) -> Self {
|
||||
pub(crate) fn new(
|
||||
src: S,
|
||||
dst: D,
|
||||
max_circuit_duration: Duration,
|
||||
max_circuit_bytes: u64,
|
||||
) -> Self {
|
||||
CopyFuture {
|
||||
src: BufReader::new(src),
|
||||
dst: BufReader::new(dst),
|
||||
|
Reference in New Issue
Block a user