diff options
Diffstat (limited to 'apps/src')
-rw-r--r-- | apps/src/bin/quiche-server.rs | 8 | ||||
-rw-r--r-- | apps/src/common.rs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/src/bin/quiche-server.rs b/apps/src/bin/quiche-server.rs index f5d56910..3d261c1c 100644 --- a/apps/src/bin/quiche-server.rs +++ b/apps/src/bin/quiche-server.rs @@ -617,7 +617,7 @@ fn main() { ); for id in c.conn.source_ids() { - let id_owned = id.clone().into_owned(); + let id_owned = id.clone(); clients_ids.remove(&id_owned); } } @@ -658,9 +658,9 @@ fn mint_token(hdr: &quiche::Header, src: &net::SocketAddr) -> Vec<u8> { /// /// Note that this function is only an example and doesn't do any cryptographic /// authenticate of the token. *It should not be used in production system*. -fn validate_token<'a>( - src: &net::SocketAddr, token: &'a [u8], -) -> Option<quiche::ConnectionId<'a>> { +fn validate_token( + src: &net::SocketAddr, token: &[u8], +) -> Option<quiche::ConnectionId> { if token.len() < 6 { return None; } diff --git a/apps/src/common.rs b/apps/src/common.rs index e58e4a01..6f4fc83c 100644 --- a/apps/src/common.rs +++ b/apps/src/common.rs @@ -100,7 +100,7 @@ pub struct Client { pub max_send_burst: usize, } -pub type ClientIdMap = HashMap<ConnectionId<'static>, ClientId>; +pub type ClientIdMap = HashMap<ConnectionId, ClientId>; pub type ClientMap = HashMap<ClientId, Client>; /// Makes a buffered writer for a resource with a target URL. @@ -255,7 +255,7 @@ pub fn hdrs_to_strings(hdrs: &[quiche::h3::Header]) -> Vec<(String, String)> { /// Generate a new pair of Source Connection ID and reset token. pub fn generate_cid_and_reset_token<T: SecureRandom>( rng: &T, -) -> (quiche::ConnectionId<'static>, u128) { +) -> (quiche::ConnectionId, u128) { let mut scid = [0; quiche::MAX_CONN_ID_LEN]; rng.fill(&mut scid).unwrap(); let scid = scid.to_vec().into(); |