diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-31 15:03:14 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-31 15:03:14 +0200 |
commit | 51179f5433fbc1617d59e25493a22072c0987726 (patch) | |
tree | 3034f4ca9d35da77c55750e5c0c058bafeea22ff /src/types/endpoint.rs | |
parent | Move to RustCrypto AEAD crate for handshake (diff) | |
download | wireguard-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.rs | 7 |
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> {} |