summaryrefslogtreecommitdiffstats
path: root/ipfs-api/src/client/from_uri.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ipfs-api/src/client/from_uri.rs')
-rw-r--r--ipfs-api/src/client/from_uri.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipfs-api/src/client/from_uri.rs b/ipfs-api/src/client/from_uri.rs
index 71a7385..8d22f41 100644
--- a/ipfs-api/src/client/from_uri.rs
+++ b/ipfs-api/src/client/from_uri.rs
@@ -104,6 +104,9 @@ pub trait TryFromUri: Sized {
Self::from_ipv6(scheme, SocketAddrV6::new(v6addr, port, 0, 0)).unwrap(),
)
}
+ Protocol::Dns(ref hostname) => {
+ return Ok(Self::from_host_and_port(scheme, hostname, port).unwrap())
+ }
Protocol::Dns4(ref v4host) => {
return Ok(Self::from_host_and_port(scheme, v4host, port).unwrap())
}