mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-22 20:52:27 +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
|
@ -17,8 +17,8 @@
|
|||
<a href="https://www.rust-lang.org/en-US/">
|
||||
<img alt="Build with Rust" src="https://img.shields.io/badge/Made%20with-Rust-orange.svg"/>
|
||||
</a>
|
||||
<a href="https://blog.rust-lang.org/2019/12/19/Rust-1.40.0.html">
|
||||
<img alt="Minimum Rust Version" src="https://img.shields.io/badge/rustc-1.40+-yellow.svg"/>
|
||||
<a href="https://blog.rust-lang.org/2020/03/12/Rust-1.42.html">
|
||||
<img alt="Minimum Rust Version" src="https://img.shields.io/badge/rustc-1.42+-yellow.svg"/>
|
||||
</a>
|
||||
</div>
|
||||
<br/>
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
<a href="https://www.rust-lang.org/en-US/">
|
||||
<img alt="Build with Rust" src="https://img.shields.io/badge/Made%20with-Rust-orange.svg"/>
|
||||
</a>
|
||||
<a href="https://blog.rust-lang.org/2019/12/19/Rust-1.40.0.html">
|
||||
<img alt="Minimum Rust Version" src="https://img.shields.io/badge/rustc-1.40+-yellow.svg"/>
|
||||
<a href="https://blog.rust-lang.org/2020/03/12/Rust-1.42.html">
|
||||
<img alt="Minimum Rust Version" src="https://img.shields.io/badge/rustc-1.42+-yellow.svg"/>
|
||||
</a>
|
||||
</div>
|
||||
<br/>
|
||||
|
|
|
@ -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
Reference in a new issue