summaryrefslogtreecommitdiffstats
path: root/src/types/endpoint.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-31 15:03:14 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-31 15:03:14 +0200
commit51179f5433fbc1617d59e25493a22072c0987726 (patch)
tree3034f4ca9d35da77c55750e5c0c058bafeea22ff /src/types/endpoint.rs
parentMove to RustCrypto AEAD crate for handshake (diff)
downloadwireguard-rs-51179f5433fbc1617d59e25493a22072c0987726.tar.xz
wireguard-rs-51179f5433fbc1617d59e25493a22072c0987726.zip
Better management of key material
Diffstat (limited to 'src/types/endpoint.rs')
-rw-r--r--src/types/endpoint.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/types/endpoint.rs b/src/types/endpoint.rs
index aa4dfd7..6bc99b9 100644
--- a/src/types/endpoint.rs
+++ b/src/types/endpoint.rs
@@ -1,8 +1,5 @@
use std::net::SocketAddr;
-/* The generic implementation (not supporting "sticky-sockets"),
- * is to simply use SocketAddr directly as the endpoint.
- */
-pub trait Endpoint: Into<SocketAddr> {}
+pub trait Endpoint: Into<SocketAddr> + From<SocketAddr> {}
-impl<T> Endpoint for T where T: Into<SocketAddr> {}
+impl<T> Endpoint for T where T: Into<SocketAddr> + From<SocketAddr> {}