From ca0251640afdc6908cbf0ca02186c2235fab9a38 Mon Sep 17 00:00:00 2001 From: stammw Date: Wed, 2 Oct 2019 13:29:07 +0200 Subject: [PATCH] H3: Make Settings and SettingsFrame the same type --- quinn-h3/src/lib.rs | 19 ++----------------- quinn-h3/src/proto/frame.rs | 2 +- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/quinn-h3/src/lib.rs b/quinn-h3/src/lib.rs index d30acfee8..57e757061 100644 --- a/quinn-h3/src/lib.rs +++ b/quinn-h3/src/lib.rs @@ -25,24 +25,9 @@ mod streams; use err_derive::Error; use quinn::VarInt; -#[derive(Clone, Debug)] -pub struct Settings { - pub max_header_list_size: u64, - pub num_placeholders: u64, - pub qpack_max_table_capacity: u64, - pub qpack_blocked_streams: u64, -} +use proto::frame::SettingsFrame; -impl Default for Settings { - fn default() -> Self { - Self { - max_header_list_size: u64::max_value(), - num_placeholders: 0, - qpack_max_table_capacity: 0, - qpack_blocked_streams: 0, - } - } -} +pub type Settings = SettingsFrame; #[derive(Debug, Error)] pub enum Error { diff --git a/quinn-h3/src/proto/frame.rs b/quinn-h3/src/proto/frame.rs index 384f97e85..c544bc63b 100644 --- a/quinn-h3/src/proto/frame.rs +++ b/quinn-h3/src/proto/frame.rs @@ -333,7 +333,7 @@ impl FrameHeader for PriorityFrame { } } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] pub struct SettingsFrame { pub num_placeholders: u64, pub max_header_list_size: u64,