Skip to content

Commit

Permalink
chore: format files
Browse files Browse the repository at this point in the history
  • Loading branch information
rob committed Nov 28, 2024
1 parent dded3e8 commit dc17be5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ impl Request<()> {
/// ```
pub fn get<T>(uri: T) -> Builder
where
T: TryInto<Uri>,
T: TryInto<Uri>,
<T as TryInto<Uri>>::Error: Into<crate::Error>,
{
Builder::new().method(Method::GET).uri(uri)
Expand All @@ -253,7 +253,7 @@ impl Request<()> {
/// ```
pub fn put<T>(uri: T) -> Builder
where
T: TryInto<Uri>,
T: TryInto<Uri>,
<T as TryInto<Uri>>::Error: Into<crate::Error>,
{
Builder::new().method(Method::PUT).uri(uri)
Expand All @@ -275,7 +275,7 @@ impl Request<()> {
/// ```
pub fn post<T>(uri: T) -> Builder
where
T: TryInto<Uri>,
T: TryInto<Uri>,
<T as TryInto<Uri>>::Error: Into<crate::Error>,
{
Builder::new().method(Method::POST).uri(uri)
Expand All @@ -297,7 +297,7 @@ impl Request<()> {
/// ```
pub fn delete<T>(uri: T) -> Builder
where
T: TryInto<Uri>,
T: TryInto<Uri>,
<T as TryInto<Uri>>::Error: Into<crate::Error>,
{
Builder::new().method(Method::DELETE).uri(uri)
Expand All @@ -321,7 +321,7 @@ impl Request<()> {
pub fn options<T>(uri: T) -> Builder
where
T: TryInto<Uri>,
<T as TryInto<Uri>>::Error: Into<crate::Error>
<T as TryInto<Uri>>::Error: Into<crate::Error>,
{
Builder::new().method(Method::OPTIONS).uri(uri)
}
Expand All @@ -343,7 +343,7 @@ impl Request<()> {
pub fn head<T>(uri: T) -> Builder
where
T: TryInto<Uri>,
<T as TryInto<Uri>>::Error: Into<crate::Error>
<T as TryInto<Uri>>::Error: Into<crate::Error>,
{
Builder::new().method(Method::HEAD).uri(uri)
}
Expand All @@ -365,7 +365,7 @@ impl Request<()> {
pub fn connect<T>(uri: T) -> Builder
where
T: TryInto<Uri>,
<T as TryInto<Uri>>::Error: Into<crate::Error>
<T as TryInto<Uri>>::Error: Into<crate::Error>,
{
Builder::new().method(Method::CONNECT).uri(uri)
}
Expand All @@ -387,7 +387,7 @@ impl Request<()> {
pub fn patch<T>(uri: T) -> Builder
where
T: TryInto<Uri>,
<T as TryInto<Uri>>::Error: Into<crate::Error>
<T as TryInto<Uri>>::Error: Into<crate::Error>,
{
Builder::new().method(Method::PATCH).uri(uri)
}
Expand All @@ -409,7 +409,7 @@ impl Request<()> {
pub fn trace<T>(uri: T) -> Builder
where
T: TryInto<Uri>,
<T as TryInto<Uri>>::Error: Into<crate::Error>
<T as TryInto<Uri>>::Error: Into<crate::Error>,
{
Builder::new().method(Method::TRACE).uri(uri)
}
Expand Down Expand Up @@ -768,7 +768,7 @@ impl Builder {
pub fn method<T>(self, method: T) -> Builder
where
T: TryInto<Method>,
<T as TryInto<Method>>::Error: Into<crate::Error>
<T as TryInto<Method>>::Error: Into<crate::Error>,
{
self.and_then(move |mut head| {
let method = method.try_into().map_err(Into::into)?;
Expand Down Expand Up @@ -813,7 +813,7 @@ impl Builder {
pub fn uri<T>(self, uri: T) -> Builder
where
T: TryInto<Uri>,
<T as TryInto<Uri>>::Error: Into<crate::Error>
<T as TryInto<Uri>>::Error: Into<crate::Error>,
{
self.and_then(move |mut head| {
head.uri = uri.try_into().map_err(Into::into)?;
Expand Down
14 changes: 7 additions & 7 deletions src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ use std::fmt;
use crate::header::{HeaderMap, HeaderName, HeaderValue};
use crate::status::StatusCode;
use crate::version::Version;
use crate::{ Extensions, Result};
use crate::{Extensions, Result};

/// Represents an HTTP response
///
Expand Down Expand Up @@ -559,8 +559,8 @@ impl Builder {
/// ```
pub fn status<T>(self, status: T) -> Builder
where
T: TryInto<StatusCode>,
<T as TryInto<StatusCode>>::Error: Into<crate::Error>,
T: TryInto<StatusCode>,
<T as TryInto<StatusCode>>::Error: Into<crate::Error>,
{
self.and_then(move |mut head| {
head.status = status.try_into().map_err(Into::into)?;
Expand Down Expand Up @@ -610,10 +610,10 @@ impl Builder {
/// ```
pub fn header<K, V>(self, key: K, value: V) -> Builder
where
K: TryInto<HeaderName>,
<K as TryInto<HeaderName>>::Error: Into<crate::Error>,
V: TryInto<HeaderValue>,
<V as TryInto<HeaderValue>>::Error: Into<crate::Error>,
K: TryInto<HeaderName>,
<K as TryInto<HeaderName>>::Error: Into<crate::Error>,
V: TryInto<HeaderValue>,
<V as TryInto<HeaderValue>>::Error: Into<crate::Error>,
{
self.and_then(move |mut head| {
let name = key.try_into().map_err(Into::into)?;
Expand Down
8 changes: 4 additions & 4 deletions src/uri/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ impl Builder {
/// ```
pub fn scheme<T>(self, scheme: T) -> Self
where
T: TryInto<Scheme>,
<T as TryInto<Scheme>>::Error: Into<crate::Error>,
T: TryInto<Scheme>,
<T as TryInto<Scheme>>::Error: Into<crate::Error>,
{
self.map(move |mut parts| {
let scheme = scheme.try_into().map_err(Into::into)?;
Expand All @@ -68,7 +68,7 @@ impl Builder {
/// ```
pub fn authority<T>(self, auth: T) -> Self
where
T: TryInto<Authority>,
T: TryInto<Authority>,
<T as TryInto<Authority>>::Error: Into<crate::Error>,
{
self.map(move |mut parts| {
Expand All @@ -92,7 +92,7 @@ impl Builder {
/// ```
pub fn path_and_query<T>(self, p_and_q: T) -> Self
where
T: TryInto<PathAndQuery>,
T: TryInto<PathAndQuery>,
<T as TryInto<PathAndQuery>>::Error: Into<crate::Error>,
{
self.map(move |mut parts| {
Expand Down

0 comments on commit dc17be5

Please sign in to comment.