Remove code that was made obsolete by #555

This commit is contained in:
Anthony Ramine
2021-09-13 10:23:09 +02:00
committed by Sean McArthur
parent 61b4f8fc34
commit 96d9277454
4 changed files with 2 additions and 36 deletions

View File

@@ -10,12 +10,6 @@ pub struct Encoder {
size_update: Option<SizeUpdate>,
}
#[derive(Debug)]
pub struct EncodeState {
index: Index,
value: Option<HeaderValue>,
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
enum SizeUpdate {
One(usize),

View File

@@ -8,5 +8,5 @@ mod table;
mod test;
pub use self::decoder::{Decoder, DecoderError, NeedMore};
pub use self::encoder::{EncodeState, Encoder};
pub use self::encoder::Encoder;
pub use self::header::{BytesStr, Header};

View File

@@ -8,7 +8,6 @@ use rand::{Rng, SeedableRng, StdRng};
use std::io::Cursor;
const MIN_CHUNK: usize = 16;
const MAX_CHUNK: usize = 2 * 1024;
#[test]
@@ -36,17 +35,8 @@ fn hpack_fuzz_seeded() {
#[derive(Debug, Clone)]
struct FuzzHpack {
// The magic seed that makes the test case reproducible
seed: [usize; 4],
// The set of headers to encode / decode
frames: Vec<HeaderFrame>,
// The list of chunk sizes to do it in
chunks: Vec<usize>,
// Number of times reduced
reduced: usize,
}
#[derive(Debug, Clone)]
@@ -128,19 +118,7 @@ impl FuzzHpack {
frames.push(frame);
}
// Now, generate the buffer sizes used to encode
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,
}
FuzzHpack { frames }
}
fn run(self) {

View File

@@ -77,12 +77,6 @@ pub(crate) enum Open {
Headers,
}
#[derive(Debug, Clone, Copy)]
struct Indices {
head: store::Key,
tail: store::Key,
}
impl Recv {
pub fn new(peer: peer::Dyn, config: &Config) -> Self {
let next_stream_id = if peer.is_server() { 1 } else { 2 };