[quicktap][fixup] warning cleanup
This commit is contained in:
parent
041915154a
commit
8d2e6afec4
|
@ -9,8 +9,8 @@ fn pad_packet(p: &Vec<u8>) -> Vec<u8> {
|
|||
padded.append(&mut vec![0u8; 16 - (p.len() % 16)]);
|
||||
padded
|
||||
}
|
||||
fn unpad_packet(p: &Vec<u8>) -> Vec<u8> {
|
||||
p.into_iter().rev().skip_while(|x| **x == 0).map(|x| x.clone()).collect::<Vec<u8>>()
|
||||
fn unpad_packet(p: &[u8]) -> 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.
|
||||
|
|
|
@ -3,7 +3,7 @@ use std::fmt::{Debug, Formatter};
|
|||
|
||||
use rand::rngs::OsRng;
|
||||
use tai64::Tai64N;
|
||||
use x25519_dalek::{EphemeralSecret, PublicKey, StaticSecret};
|
||||
use x25519_dalek::{PublicKey, StaticSecret};
|
||||
|
||||
use crate::qcrypto::hkdf::qcrypto_hkdf;
|
||||
use crate::qcrypto::timestamp;
|
||||
|
|
Loading…
Reference in New Issue