Skip to content

Commit

Permalink
fix(client): Change TryFrom to use try_from_uri
Browse files Browse the repository at this point in the history
Change TryFrom<Uri> for Destination to use Destination's
internal try_from_uri method.

Ref Issue: hyperium#1808
  • Loading branch information
M3rs committed May 9, 2019
1 parent ea02c04 commit f5cb0bc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/client/connect/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,7 @@ impl TryFrom<Uri> for Destination {
type Error = ::error::Error;

fn try_from(uri: Uri) -> Result<Self, Self::Error> {
uri.authority_part().ok_or(::error::Parse::Uri)?;
uri.scheme_part().ok_or(::error::Parse::Uri)?;
Ok(Destination { uri })
Destination::try_from_uri(uri)
}
}

Expand Down

0 comments on commit f5cb0bc

Please sign in to comment.