From dded3e8953045e108826bea7fa714ee886952830 Mon Sep 17 00:00:00 2001 From: rob Date: Wed, 27 Nov 2024 23:55:44 -0500 Subject: [PATCH] feat: TryInto trait bound for uri::Builder --- src/uri/builder.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/uri/builder.rs b/src/uri/builder.rs index 9964d389..126b357f 100644 --- a/src/uri/builder.rs +++ b/src/uri/builder.rs @@ -1,4 +1,4 @@ -use std::convert::{TryFrom, TryInto}; +use std::convert::TryInto; use super::{Authority, Parts, PathAndQuery, Scheme}; use crate::Uri; @@ -44,8 +44,8 @@ impl Builder { /// ``` pub fn scheme(self, scheme: T) -> Self where - Scheme: TryFrom, - >::Error: Into, + T: TryInto, + >::Error: Into, { self.map(move |mut parts| { let scheme = scheme.try_into().map_err(Into::into)?; @@ -68,8 +68,8 @@ impl Builder { /// ``` pub fn authority(self, auth: T) -> Self where - Authority: TryFrom, - >::Error: Into, + T: TryInto, + >::Error: Into, { self.map(move |mut parts| { let auth = auth.try_into().map_err(Into::into)?; @@ -92,8 +92,8 @@ impl Builder { /// ``` pub fn path_and_query(self, p_and_q: T) -> Self where - PathAndQuery: TryFrom, - >::Error: Into, + T: TryInto, + >::Error: Into, { self.map(move |mut parts| { let p_and_q = p_and_q.try_into().map_err(Into::into)?;