Remove code that was made obsolete by #555
This commit is contained in:
committed by
Sean McArthur
parent
61b4f8fc34
commit
96d9277454
@@ -10,12 +10,6 @@ pub struct Encoder {
|
|||||||
size_update: Option<SizeUpdate>,
|
size_update: Option<SizeUpdate>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub struct EncodeState {
|
|
||||||
index: Index,
|
|
||||||
value: Option<HeaderValue>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
||||||
enum SizeUpdate {
|
enum SizeUpdate {
|
||||||
One(usize),
|
One(usize),
|
||||||
|
|||||||
@@ -8,5 +8,5 @@ mod table;
|
|||||||
mod test;
|
mod test;
|
||||||
|
|
||||||
pub use self::decoder::{Decoder, DecoderError, NeedMore};
|
pub use self::decoder::{Decoder, DecoderError, NeedMore};
|
||||||
pub use self::encoder::{EncodeState, Encoder};
|
pub use self::encoder::Encoder;
|
||||||
pub use self::header::{BytesStr, Header};
|
pub use self::header::{BytesStr, Header};
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ use rand::{Rng, SeedableRng, StdRng};
|
|||||||
|
|
||||||
use std::io::Cursor;
|
use std::io::Cursor;
|
||||||
|
|
||||||
const MIN_CHUNK: usize = 16;
|
|
||||||
const MAX_CHUNK: usize = 2 * 1024;
|
const MAX_CHUNK: usize = 2 * 1024;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -36,17 +35,8 @@ fn hpack_fuzz_seeded() {
|
|||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
struct FuzzHpack {
|
struct FuzzHpack {
|
||||||
// The magic seed that makes the test case reproducible
|
|
||||||
seed: [usize; 4],
|
|
||||||
|
|
||||||
// The set of headers to encode / decode
|
// The set of headers to encode / decode
|
||||||
frames: Vec<HeaderFrame>,
|
frames: Vec<HeaderFrame>,
|
||||||
|
|
||||||
// The list of chunk sizes to do it in
|
|
||||||
chunks: Vec<usize>,
|
|
||||||
|
|
||||||
// Number of times reduced
|
|
||||||
reduced: usize,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
@@ -128,19 +118,7 @@ impl FuzzHpack {
|
|||||||
frames.push(frame);
|
frames.push(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now, generate the buffer sizes used to encode
|
FuzzHpack { frames }
|
||||||
let mut chunks = vec![];
|
|
||||||
|
|
||||||
for _ in 0..rng.gen_range(0, 100) {
|
|
||||||
chunks.push(rng.gen_range(MIN_CHUNK, MAX_CHUNK));
|
|
||||||
}
|
|
||||||
|
|
||||||
FuzzHpack {
|
|
||||||
seed: seed,
|
|
||||||
frames: frames,
|
|
||||||
chunks: chunks,
|
|
||||||
reduced: 0,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run(self) {
|
fn run(self) {
|
||||||
|
|||||||
@@ -77,12 +77,6 @@ pub(crate) enum Open {
|
|||||||
Headers,
|
Headers,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy)]
|
|
||||||
struct Indices {
|
|
||||||
head: store::Key,
|
|
||||||
tail: store::Key,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Recv {
|
impl Recv {
|
||||||
pub fn new(peer: peer::Dyn, config: &Config) -> Self {
|
pub fn new(peer: peer::Dyn, config: &Config) -> Self {
|
||||||
let next_stream_id = if peer.is_server() { 1 } else { 2 };
|
let next_stream_id = if peer.is_server() { 1 } else { 2 };
|
||||||
|
|||||||
Reference in New Issue
Block a user