1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-28 09:42:40 +01: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.0, "name");
assert_eq!(s.1, 32); 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[0], "name".to_owned());
assert_eq!(res[1], "32".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 /// Convert request to a Self
/// ///
/// This method uses default extractor configuration /// 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()) Self::from_request(req, &Self::Config::default())
} }
} }