mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 01:32:57 +01:00
rename from_default to extract
This commit is contained in:
parent
76b644365f
commit
1aadfee6f7
@ -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 New Issue
Block a user