[quicktap][fixup] warning cleanup

This commit is contained in:
core 2022-12-19 21:43:32 -05:00
parent 041915154a
commit 8d2e6afec4
Signed by: core
GPG Key ID: FDBF740DADDCEECF
2 changed files with 3 additions and 3 deletions

View File

@ -9,8 +9,8 @@ fn pad_packet(p: &Vec<u8>) -> Vec<u8> {
padded.append(&mut vec![0u8; 16 - (p.len() % 16)]); padded.append(&mut vec![0u8; 16 - (p.len() % 16)]);
padded padded
} }
fn unpad_packet(p: &Vec<u8>) -> Vec<u8> { fn unpad_packet(p: &[u8]) -> Vec<u8> {
p.into_iter().rev().skip_while(|x| **x == 0).map(|x| x.clone()).collect::<Vec<u8>>() p.iter().rev().skip_while(|x| **x == 0).copied().collect::<Vec<u8>>()
} }
/// Given any arbitrary IP packet, pad and encrypt it with the current handshake state. /// Given any arbitrary IP packet, pad and encrypt it with the current handshake state.

View File

@ -3,7 +3,7 @@ use std::fmt::{Debug, Formatter};
use rand::rngs::OsRng; use rand::rngs::OsRng;
use tai64::Tai64N; use tai64::Tai64N;
use x25519_dalek::{EphemeralSecret, PublicKey, StaticSecret}; use x25519_dalek::{PublicKey, StaticSecret};
use crate::qcrypto::hkdf::qcrypto_hkdf; use crate::qcrypto::hkdf::qcrypto_hkdf;
use crate::qcrypto::timestamp; use crate::qcrypto::timestamp;