FramedWrite

This commit is contained in:
Carl Lerche
2017-06-19 13:34:08 -07:00
parent 327ca79550
commit 29951da962
7 changed files with 159 additions and 49 deletions

View File

@@ -214,7 +214,7 @@ impl FuzzHpack {
}
loop {
match encoder.encode(index.take(), &mut input, &mut buf).unwrap() {
match encoder.encode(index.take(), &mut input, &mut buf) {
Encode::Full => break,
Encode::Partial(i) => {
index = Some(i);
@@ -531,7 +531,7 @@ fn test_story(story: Value) {
Header::new(name.clone().into(), value.clone().into()).unwrap().into()
}).collect();
encoder.encode(None, &mut input.clone().into_iter(), &mut buf).unwrap();
encoder.encode(None, &mut input.clone().into_iter(), &mut buf);
decoder.decode(&buf.into(), |e| {
assert_eq!(e, input.remove(0).reify().unwrap());