summaryrefslogtreecommitdiffstats
path: root/third_party/rust/neqo-qpack/src/reader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/neqo-qpack/src/reader.rs')
-rw-r--r--third_party/rust/neqo-qpack/src/reader.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/third_party/rust/neqo-qpack/src/reader.rs b/third_party/rust/neqo-qpack/src/reader.rs
index ff9c42b246..0173ed7888 100644
--- a/third_party/rust/neqo-qpack/src/reader.rs
+++ b/third_party/rust/neqo-qpack/src/reader.rs
@@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use std::{convert::TryInto, mem, str};
+use std::{mem, str};
use neqo_common::{qdebug, qerror};
use neqo_transport::{Connection, StreamId};
@@ -223,20 +223,19 @@ impl IntReader {
}
}
-#[derive(Debug)]
+#[derive(Debug, Default)]
enum LiteralReaderState {
+ #[default]
ReadHuffman,
- ReadLength { reader: IntReader },
- ReadLiteral { offset: usize },
+ ReadLength {
+ reader: IntReader,
+ },
+ ReadLiteral {
+ offset: usize,
+ },
Done,
}
-impl Default for LiteralReaderState {
- fn default() -> Self {
- Self::ReadHuffman
- }
-}
-
/// This is decoder of a literal with a prefix:
/// 1) ignores `prefix_len` bits of the first byte,
/// 2) reads "huffman bit"