Skip to content

Commit eacce50

Browse files
committed
proto: Make BytesSource private
There are no public APIs that accept BytesSource. This commit makes it not be re-exported publically.
1 parent f642fa8 commit eacce50

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

quinn-proto/src/connection/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ pub use streams::StreamsState;
8080
#[cfg(not(fuzzing))]
8181
use streams::StreamsState;
8282
pub use streams::{
83-
BytesSource, Chunks, ClosedStream, FinishError, ReadError, ReadableError, RecvStream,
84-
SendStream, ShouldTransmit, StreamEvent, Streams, WriteError, Written,
83+
Chunks, ClosedStream, FinishError, ReadError, ReadableError, RecvStream, SendStream,
84+
ShouldTransmit, StreamEvent, Streams, WriteError, Written,
8585
};
8686

8787
mod timer;

quinn-proto/src/connection/streams/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ pub use recv::{Chunks, ReadError, ReadableError};
2020

2121
mod send;
2222
pub(crate) use send::{ByteSlice, BytesArray};
23-
pub use send::{BytesSource, FinishError, WriteError, Written};
24-
use send::{Send, SendState};
23+
use send::{BytesSource, Send, SendState};
24+
pub use send::{FinishError, WriteError, Written};
2525

2626
mod state;
2727
#[allow(unreachable_pub)] // fuzzing only

quinn-proto/src/connection/streams/send.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ impl BytesSource for ByteSlice<'_> {
227227
///
228228
/// The purpose of this data type is to defer conversion as long as possible,
229229
/// so that no heap allocation is required in case no data is writable.
230-
pub trait BytesSource {
230+
pub(super) trait BytesSource {
231231
/// Returns the next chunk from the source of owned chunks.
232232
///
233233
/// This method will consume parts of the source.

quinn-proto/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ pub use bloom_token_log::BloomTokenLog;
4444

4545
mod connection;
4646
pub use crate::connection::{
47-
BytesSource, Chunk, Chunks, ClosedStream, Connection, ConnectionError, ConnectionStats,
48-
Datagrams, Event, FinishError, FrameStats, PathStats, ReadError, ReadableError, RecvStream,
49-
RttEstimator, SendDatagramError, SendStream, ShouldTransmit, StreamEvent, Streams, UdpStats,
50-
WriteError, Written,
47+
Chunk, Chunks, ClosedStream, Connection, ConnectionError, ConnectionStats, Datagrams, Event,
48+
FinishError, FrameStats, PathStats, ReadError, ReadableError, RecvStream, RttEstimator,
49+
SendDatagramError, SendStream, ShouldTransmit, StreamEvent, Streams, UdpStats, WriteError,
50+
Written,
5151
};
5252

5353
#[cfg(feature = "rustls")]

0 commit comments

Comments
 (0)