1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-04-20 06:54:46 +00:00

move to Rust 1.42 features

This commit is contained in:
Dominic 2020-04-25 16:47:33 +02:00
parent ad6e3dd00d
commit 147ea980bf
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
4 changed files with 7 additions and 18 deletions

View file

@ -1,5 +1,3 @@
extern crate proc_macro;
use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
use quote::quote;

View file

@ -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<TokenStream2>