aboutsummaryrefslogtreecommitdiff
path: root/net/src/endpoint.rs
diff options
context:
space:
mode:
Diffstat (limited to 'net/src/endpoint.rs')
-rw-r--r--net/src/endpoint.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/src/endpoint.rs b/net/src/endpoint.rs
index 0c7ecd1..5aebdf9 100644
--- a/net/src/endpoint.rs
+++ b/net/src/endpoint.rs
@@ -238,6 +238,12 @@ impl ToEndpoint for String {
}
}
+impl ToEndpoint for Endpoint {
+ fn to_endpoint(&self) -> Result<Endpoint> {
+ Ok(self.clone())
+ }
+}
+
impl ToEndpoint for &str {
fn to_endpoint(&self) -> Result<Endpoint> {
Endpoint::from_str(self)