1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-10-21 09:23:54 +00:00

rename from_default to extract

This commit is contained in:
Nikolay Kim 2018-05-02 06:09:50 -07:00
parent 76b644365f
commit 1aadfee6f7
2 changed files with 2 additions and 2 deletions

View file

@ -591,7 +591,7 @@ mod tests {
assert_eq!(s.0, "name");
assert_eq!(s.1, 32);
let res = Path::<Vec<String>>::from_default(&req).unwrap();
let res = Path::<Vec<String>>::extract(&req).unwrap();
assert_eq!(res[0], "name".to_owned());
assert_eq!(res[1], "32".to_owned());
}

View file

@ -49,7 +49,7 @@ pub trait FromRequest<S>: Sized {
/// Convert request to a Self
///
/// This method uses default extractor configuration
fn from_default(req: &HttpRequest<S>) -> Self::Result {
fn extract(req: &HttpRequest<S>) -> Self::Result {
Self::from_request(req, &Self::Config::default())
}
}