Update dependencies
This commit is contained in:
parent
ef2535a7c2
commit
3b3744153f
@ -19,21 +19,21 @@ serde_urlencoded = "0.6.1"
|
|||||||
ruma-identifiers = "0.14.0"
|
ruma-identifiers = "0.14.0"
|
||||||
|
|
||||||
[dependencies.percent-encoding]
|
[dependencies.percent-encoding]
|
||||||
version = "2.0.0"
|
version = "2.1.0"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.ruma-api-macros]
|
[dependencies.ruma-api-macros]
|
||||||
version = "0.7.0"
|
version = "0.7.1"
|
||||||
path = "ruma-api-macros"
|
path = "ruma-api-macros"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.serde]
|
[dependencies.serde]
|
||||||
version = "1.0.98"
|
version = "1.0.99"
|
||||||
features = ["derive"]
|
features = ["derive"]
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.url]
|
[dependencies.url]
|
||||||
version = "2.0.0"
|
version = "2.1.0"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
@ -13,11 +13,11 @@ version = "0.7.1"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
quote = "0.6.13"
|
quote = "1.0.1"
|
||||||
proc-macro2 = "0.4.30"
|
proc-macro2 = "1.0.1"
|
||||||
|
|
||||||
[dependencies.syn]
|
[dependencies.syn]
|
||||||
version = "0.15.42"
|
version = "1.0.2"
|
||||||
features = ["full"]
|
features = ["full"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
//! Details of the `#[ruma_api(...)]` attributes.
|
//! Details of the `#[ruma_api(...)]` attributes.
|
||||||
|
|
||||||
use syn::{
|
use syn::{
|
||||||
parenthesized,
|
|
||||||
parse::{Parse, ParseStream},
|
parse::{Parse, ParseStream},
|
||||||
Ident, Token,
|
Ident, Token,
|
||||||
};
|
};
|
||||||
@ -24,7 +23,8 @@ impl Meta {
|
|||||||
segments,
|
segments,
|
||||||
} => {
|
} => {
|
||||||
if segments.len() == 1 && segments[0].ident == "ruma_api" {
|
if segments.len() == 1 && segments[0].ident == "ruma_api" {
|
||||||
Ok(syn::parse2(attr.tts)
|
Ok(attr
|
||||||
|
.parse_args()
|
||||||
.expect("ruma_api! could not parse request field attributes"))
|
.expect("ruma_api! could not parse request field attributes"))
|
||||||
} else {
|
} else {
|
||||||
Err(attr)
|
Err(attr)
|
||||||
@ -46,15 +46,13 @@ pub struct MetaNameValue {
|
|||||||
|
|
||||||
impl Parse for Meta {
|
impl Parse for Meta {
|
||||||
fn parse(input: ParseStream) -> syn::Result<Self> {
|
fn parse(input: ParseStream) -> syn::Result<Self> {
|
||||||
let content;
|
let ident = input.parse()?;
|
||||||
let _ = parenthesized!(content in input);
|
|
||||||
let ident = content.parse()?;
|
|
||||||
|
|
||||||
if content.peek(Token![=]) {
|
if input.peek(Token![=]) {
|
||||||
let _ = content.parse::<Token![=]>();
|
let _ = input.parse::<Token![=]>();
|
||||||
Ok(Meta::NameValue(MetaNameValue {
|
Ok(Meta::NameValue(MetaNameValue {
|
||||||
name: ident,
|
name: ident,
|
||||||
value: content.parse()?,
|
value: input.parse()?,
|
||||||
}))
|
}))
|
||||||
} else {
|
} else {
|
||||||
Ok(Meta::Word(ident))
|
Ok(Meta::Word(ident))
|
||||||
|
@ -24,19 +24,16 @@ pub fn strip_serde_attrs(field: &Field) -> Field {
|
|||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|attr| {
|
.filter(|attr| {
|
||||||
let meta = attr
|
let meta = attr
|
||||||
.interpret_meta()
|
.parse_meta()
|
||||||
.expect("ruma_api! could not parse field attributes");
|
.expect("ruma_api! could not parse field attributes");
|
||||||
|
|
||||||
let meta_list = match meta {
|
match meta {
|
||||||
Meta::List(meta_list) => meta_list,
|
Meta::List(meta_list) => {
|
||||||
_ => return true,
|
let segments = &meta_list.path.segments;
|
||||||
};
|
segments.len() != 1 || segments[0].ident != "serde"
|
||||||
|
}
|
||||||
if &meta_list.ident.to_string() == "serde" {
|
_ => true,
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
true
|
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user