diff options
Diffstat (limited to 'third_party/rust/neqo-http3/src/frames')
-rw-r--r-- | third_party/rust/neqo-http3/src/frames/hframe.rs | 7 | ||||
-rw-r--r-- | third_party/rust/neqo-http3/src/frames/reader.rs | 2 | ||||
-rw-r--r-- | third_party/rust/neqo-http3/src/frames/wtframe.rs | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/third_party/rust/neqo-http3/src/frames/hframe.rs b/third_party/rust/neqo-http3/src/frames/hframe.rs index 83e69ba894..e69f7b449e 100644 --- a/third_party/rust/neqo-http3/src/frames/hframe.rs +++ b/third_party/rust/neqo-http3/src/frames/hframe.rs @@ -74,10 +74,7 @@ impl HFrame { Self::MaxPushId { .. } => H3_FRAME_TYPE_MAX_PUSH_ID, Self::PriorityUpdateRequest { .. } => H3_FRAME_TYPE_PRIORITY_UPDATE_REQUEST, Self::PriorityUpdatePush { .. } => H3_FRAME_TYPE_PRIORITY_UPDATE_PUSH, - Self::Grease => { - let r = random(7); - Decoder::from(&r).decode_uint(7).unwrap() * 0x1f + 0x21 - } + Self::Grease => Decoder::from(&random::<7>()).decode_uint(7).unwrap() * 0x1f + 0x21, } } @@ -120,7 +117,7 @@ impl HFrame { } Self::Grease => { // Encode some number of random bytes. - let r = random(8); + let r = random::<8>(); enc.encode_vvec(&r[1..usize::from(1 + (r[0] & 0x7))]); } Self::PriorityUpdateRequest { diff --git a/third_party/rust/neqo-http3/src/frames/reader.rs b/third_party/rust/neqo-http3/src/frames/reader.rs index 5017c666a4..1a086683cf 100644 --- a/third_party/rust/neqo-http3/src/frames/reader.rs +++ b/third_party/rust/neqo-http3/src/frames/reader.rs @@ -6,7 +6,7 @@ #![allow(clippy::module_name_repetitions)] -use std::{convert::TryFrom, fmt::Debug}; +use std::fmt::Debug; use neqo_common::{ hex_with_len, qtrace, Decoder, IncrementalDecoderBuffer, IncrementalDecoderIgnore, diff --git a/third_party/rust/neqo-http3/src/frames/wtframe.rs b/third_party/rust/neqo-http3/src/frames/wtframe.rs index deb7a026a0..20e9b81936 100644 --- a/third_party/rust/neqo-http3/src/frames/wtframe.rs +++ b/third_party/rust/neqo-http3/src/frames/wtframe.rs @@ -4,8 +4,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::convert::TryFrom; - use neqo_common::{Decoder, Encoder}; use crate::{frames::reader::FrameDecoder, Error, Res}; |