diff options
Diffstat (limited to 'third_party/rust/neqo-http3/src/frames/hframe.rs')
-rw-r--r-- | third_party/rust/neqo-http3/src/frames/hframe.rs | 7 |
1 files changed, 2 insertions, 5 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 { |