From 1aadfee6f705211bbd20debc1b8e3df15fb27661 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 2 May 2018 06:09:50 -0700 Subject: [PATCH] rename from_default to extract --- src/extractor.rs | 2 +- src/handler.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extractor.rs b/src/extractor.rs index aff15c46d..12ae9e981 100644 --- a/src/extractor.rs +++ b/src/extractor.rs @@ -591,7 +591,7 @@ mod tests { assert_eq!(s.0, "name"); assert_eq!(s.1, 32); - let res = Path::>::from_default(&req).unwrap(); + let res = Path::>::extract(&req).unwrap(); assert_eq!(res[0], "name".to_owned()); assert_eq!(res[1], "32".to_owned()); } diff --git a/src/handler.rs b/src/handler.rs index 216faa29b..07281b6b3 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -49,7 +49,7 @@ pub trait FromRequest: Sized { /// Convert request to a Self /// /// This method uses default extractor configuration - fn from_default(req: &HttpRequest) -> Self::Result { + fn extract(req: &HttpRequest) -> Self::Result { Self::from_request(req, &Self::Config::default()) } }