From f54b39584d698e2e06c281b1743032a9218992a4 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Sun, 4 Sep 2016 04:22:43 -0700 Subject: [PATCH] Renamed method_variant_to_expr to method_to_path. --- macros/src/decorators/route.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros/src/decorators/route.rs b/macros/src/decorators/route.rs index 0822fd4e..bf116336 100644 --- a/macros/src/decorators/route.rs +++ b/macros/src/decorators/route.rs @@ -15,7 +15,7 @@ use syntax::ptr::P; use rocket::{Method, ContentType}; use rocket::content_type::{TopLevel, SubLevel}; -fn method_variant_to_expr(ecx: &ExtCtxt, method: Method) -> Path { +fn method_to_path(ecx: &ExtCtxt, method: Method) -> Path { quote_enum!(ecx, method => ::rocket::Method { Options, Get, Post, Put, Delete, Head, Trace, Connect, Patch; }) @@ -148,7 +148,7 @@ impl RouteGenerateExt for RouteParams { fn explode(&self, ecx: &ExtCtxt) -> (&String, Path, P, P) { let path = &self.path.node; - let method = method_variant_to_expr(ecx, self.method.node); + let method = method_to_path(ecx, self.method.node); let format = self.format.as_ref().map(|kv| kv.value().clone()); let content_type = option_as_expr(ecx, &content_type_to_expr(ecx, format)); let rank = option_as_expr(ecx, &self.rank);