Skip to content

Commit

Permalink
Remove code that was made obsolete by #555
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Sep 13, 2021
1 parent 61b4f8f commit 1e6626c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 33 deletions.
6 changes: 0 additions & 6 deletions src/hpack/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/hpack/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
20 changes: 0 additions & 20 deletions src/hpack/test/fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -128,18 +118,8 @@ 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,
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/proto/streams/recv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit 1e6626c

Please sign in to comment.