Remove take_* methods from RequestParts for Version, Method, and Uri (#151)

* Remove `RequestParts::take_method`

* Remove `RequestParts::take_uri`

* Remove `RequestParts::take_version`
This commit is contained in:
David Pedersen
2021-08-07 20:24:13 +02:00
committed by GitHub
parent 75b5615ccd
commit 4bb17cbc2d
8 changed files with 51 additions and 116 deletions
+1 -4
View File
@@ -30,10 +30,7 @@ where
type Rejection = Infallible;
async fn from_request(req: &mut RequestParts<B>) -> Result<Self, Self::Rejection> {
let query = req
.uri()
.and_then(|uri| uri.query())
.map(|query| query.to_string());
let query = req.uri().query().map(|query| query.to_string());
Ok(Self(query))
}
}