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:
parent
ad6e3dd00d
commit
147ea980bf
4 changed files with 7 additions and 18 deletions
|
@ -1,5 +1,3 @@
|
|||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
use proc_macro2::TokenStream as TokenStream2;
|
||||
use quote::quote;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue