Skip to content

Commit f5cb0bc

Browse files
committed
fix(client): Change TryFrom to use try_from_uri
Change TryFrom<Uri> for Destination to use Destination's internal try_from_uri method. Ref Issue: hyperium#1808
1 parent ea02c04 commit f5cb0bc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/client/connect/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,7 @@ impl TryFrom<Uri> for Destination {
257257
type Error = ::error::Error;
258258

259259
fn try_from(uri: Uri) -> Result<Self, Self::Error> {
260-
uri.authority_part().ok_or(::error::Parse::Uri)?;
261-
uri.scheme_part().ok_or(::error::Parse::Uri)?;
262-
Ok(Destination { uri })
260+
Destination::try_from_uri(uri)
263261
}
264262
}
265263

0 commit comments

Comments
 (0)