Skip to content

Commit d4240b0

Browse files
authored
Merge pull request #670 from yusuke-ota/Add_http_types_req_into_tide_req
impl Into<Request> for http_types::Request
2 parents ed7ea86 + ba33a65 commit d4240b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/request.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,12 @@ impl<State> Into<http::Request> for Request<State> {
595595
}
596596
}
597597

598+
impl<State: Default> Into<Request<State>> for http_types::Request {
599+
fn into(self) -> Request<State> {
600+
Request::new(State::default(), self, Vec::<Params>::new())
601+
}
602+
}
603+
598604
// NOTE: From cannot be implemented for this conversion because `State` needs to
599605
// be constrained by a type.
600606
impl<State: Clone + Send + Sync + 'static> Into<Response> for Request<State> {

0 commit comments

Comments
 (0)