Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/streams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum Operation {

fuzz_target!(|input: (StreamParams, Vec<Operation>)| {
let (params, operations) = input;
let (mut pending, conn_state) = (Retransmits::default(), ConnectionState::Established);
let (mut pending, conn_state) = (Retransmits::default(), ConnectionState::established());
let mut state = StreamsState::new(
params.side,
params.max_remote_uni.into(),
Expand Down
7 changes: 6 additions & 1 deletion quinn-proto/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ mod transmit_buf;
use transmit_buf::TransmitBuf;

mod state;
use state::{State, StateType};

#[cfg(not(fuzzing))]
use state::State;
#[cfg(fuzzing)]
pub use state::State;
use state::StateType;

/// Protocol state and logic for a single QUIC connection
///
Expand Down
5 changes: 3 additions & 2 deletions quinn-proto/src/connection/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ impl State {
}
}

#[cfg(test)]
pub(super) fn established() -> Self {
#[allow(unreachable_pub)] // fuzzing only
#[cfg(any(test, fuzzing))]
pub fn established() -> Self {
Self {
inner: InnerState::Established,
}
Expand Down
Loading