diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/rust/neqo-qpack/src/reader.rs | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz firefox-adbda400be353e676059e335c3c0aaf99e719475.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/neqo-qpack/src/reader.rs')
-rw-r--r-- | third_party/rust/neqo-qpack/src/reader.rs | 19 |
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" |