diff --git a/README.md b/README.md index 6815044..51700af 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ Build with Rust - - Minimum Rust Version + + Minimum Rust Version
diff --git a/README.tpl b/README.tpl index a148bef..5be3b7f 100644 --- a/README.tpl +++ b/README.tpl @@ -17,8 +17,8 @@ Build with Rust - - Minimum Rust Version + + Minimum Rust Version
diff --git a/gotham_restful_derive/src/lib.rs b/gotham_restful_derive/src/lib.rs index 71017d9..4a98a9d 100644 --- a/gotham_restful_derive/src/lib.rs +++ b/gotham_restful_derive/src/lib.rs @@ -1,5 +1,3 @@ -extern crate proc_macro; - use proc_macro::TokenStream; use proc_macro2::TokenStream as TokenStream2; use quote::quote; diff --git a/gotham_restful_derive/src/method.rs b/gotham_restful_derive/src/method.rs index 098c4c7..d83f6ab 100644 --- a/gotham_restful_derive/src/method.rs +++ b/gotham_restful_derive/src/method.rs @@ -134,26 +134,17 @@ impl MethodArgumentType { fn is_method_arg(&self) -> bool { - match self { - Self::MethodArg(_) => true, - _ => false, - } + matches!(self, Self::MethodArg(_)) } fn is_database_conn(&self) -> bool { - match self { - Self::DatabaseConnection(_) => true, - _ => false - } + matches!(self, Self::DatabaseConnection(_)) } fn is_auth_status(&self) -> bool { - match self { - Self::AuthStatus(_) | Self::AuthStatusRef(_) => true, - _ => false - } + matches!(self, Self::AuthStatus(_) | Self::AuthStatusRef(_)) } fn quote_ty(&self) -> Option