aboutsummaryrefslogtreecommitdiffstats
path: root/src/types/endpoint.rs
diff options
context:
space:
mode:
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> {}