1
0
Fork 0
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:
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

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

View file

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

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>