mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-23 04:52:28 +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/">
|
<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"/>
|
<img alt="Build with Rust" src="https://img.shields.io/badge/Made%20with-Rust-orange.svg"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://blog.rust-lang.org/2019/12/19/Rust-1.40.0.html">
|
<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.40+-yellow.svg"/>
|
<img alt="Minimum Rust Version" src="https://img.shields.io/badge/rustc-1.42+-yellow.svg"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
<a href="https://www.rust-lang.org/en-US/">
|
<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"/>
|
<img alt="Build with Rust" src="https://img.shields.io/badge/Made%20with-Rust-orange.svg"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://blog.rust-lang.org/2019/12/19/Rust-1.40.0.html">
|
<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.40+-yellow.svg"/>
|
<img alt="Minimum Rust Version" src="https://img.shields.io/badge/rustc-1.42+-yellow.svg"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
extern crate proc_macro;
|
|
||||||
|
|
||||||
use proc_macro::TokenStream;
|
use proc_macro::TokenStream;
|
||||||
use proc_macro2::TokenStream as TokenStream2;
|
use proc_macro2::TokenStream as TokenStream2;
|
||||||
use quote::quote;
|
use quote::quote;
|
||||||
|
|
|
@ -134,26 +134,17 @@ impl MethodArgumentType
|
||||||
{
|
{
|
||||||
fn is_method_arg(&self) -> bool
|
fn is_method_arg(&self) -> bool
|
||||||
{
|
{
|
||||||
match self {
|
matches!(self, Self::MethodArg(_))
|
||||||
Self::MethodArg(_) => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_database_conn(&self) -> bool
|
fn is_database_conn(&self) -> bool
|
||||||
{
|
{
|
||||||
match self {
|
matches!(self, Self::DatabaseConnection(_))
|
||||||
Self::DatabaseConnection(_) => true,
|
|
||||||
_ => false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_auth_status(&self) -> bool
|
fn is_auth_status(&self) -> bool
|
||||||
{
|
{
|
||||||
match self {
|
matches!(self, Self::AuthStatus(_) | Self::AuthStatusRef(_))
|
||||||
Self::AuthStatus(_) | Self::AuthStatusRef(_) => true,
|
|
||||||
_ => false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn quote_ty(&self) -> Option<TokenStream2>
|
fn quote_ty(&self) -> Option<TokenStream2>
|
||||||
|
|
Loading…
Add table
Reference in a new issue