Skip to content

Commit

Permalink
Merge pull request #670 from yusuke-ota/Add_http_types_req_into_tide_req
Browse files Browse the repository at this point in the history
impl Into<Request> for http_types::Request
  • Loading branch information
yoshuawuyts authored Jul 31, 2020
2 parents ed7ea86 + ba33a65 commit d4240b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,12 @@ impl<State> Into<http::Request> for Request<State> {
}
}

impl<State: Default> Into<Request<State>> for http_types::Request {
fn into(self) -> Request<State> {
Request::new(State::default(), self, Vec::<Params>::new())
}
}

// NOTE: From cannot be implemented for this conversion because `State` needs to
// be constrained by a type.
impl<State: Clone + Send + Sync + 'static> Into<Response> for Request<State> {
Expand Down

0 comments on commit d4240b0

Please sign in to comment.