mirror of
https://github.com/actix/actix-web.git
synced 2025-01-03 05:48:45 +00:00
rename from_default to extract
This commit is contained in:
parent
76b644365f
commit
1aadfee6f7
2 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue