mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-25 00:00:23 +02:00
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:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user