aboutsummaryrefslogtreecommitdiffstats
path: root/src/handshake/peer.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-09-16 22:33:46 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-09-16 22:33:46 +0200
commitdfe4a22920e31f30f0e7ceb7c0d588dd48af13ad (patch)
tree129f8955ee34c8b36fd27305471c41349282b0bc /src/handshake/peer.rs
parentWIP: Handshake queue and workers (diff)
downloadwireguard-rs-dfe4a22920e31f30f0e7ceb7c0d588dd48af13ad.tar.xz
wireguard-rs-dfe4a22920e31f30f0e7ceb7c0d588dd48af13ad.zip
WIP: Work on handshake worker
Diffstat (limited to 'src/handshake/peer.rs')
-rw-r--r--src/handshake/peer.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/handshake/peer.rs b/src/handshake/peer.rs
index 6f0f5af..4c6f2fd 100644
--- a/src/handshake/peer.rs
+++ b/src/handshake/peer.rs
@@ -55,19 +55,19 @@ pub enum State {
impl Drop for State {
fn drop(&mut self) {
match self {
- State::InitiationSent{hs, ck, ..} => {
+ State::InitiationSent { hs, ck, .. } => {
// eph_sk already cleared by dalek-x25519
hs.clear();
ck.clear();
- },
- _ => ()
+ }
+ _ => (),
}
}
}
impl<T> Peer<T>
where
- T: Copy,
+ T: Clone,
{
pub fn new(
identifier: T, // external identifier
@@ -141,4 +141,4 @@ where
*last_initiation_consumption = Some(Instant::now());
Ok(())
}
-} \ No newline at end of file
+}