mirror of https://github.com/fafhrd91/actix-web
fix: Build with stable rust
This commit is contained in:
parent
cfd06a7b80
commit
33a19dc2c2
|
@ -69,15 +69,17 @@ impl Args {
|
||||||
let mut guards = Vec::new();
|
let mut guards = Vec::new();
|
||||||
for arg in args {
|
for arg in args {
|
||||||
match arg {
|
match arg {
|
||||||
NestedMeta::Lit(syn::Lit::Str(lit)) if path.is_none() => {
|
NestedMeta::Lit(syn::Lit::Str(lit)) => match path {
|
||||||
path = Some(lit);
|
None => {
|
||||||
}
|
path = Some(lit);
|
||||||
NestedMeta::Lit(syn::Lit::Str(lit)) if path.is_some() => {
|
}
|
||||||
return Err(syn::Error::new_spanned(
|
_ => {
|
||||||
lit,
|
return Err(syn::Error::new_spanned(
|
||||||
"Multiple paths specified! Should be only one!",
|
lit,
|
||||||
));
|
"Multiple paths specified! Should be only one!",
|
||||||
}
|
));
|
||||||
|
}
|
||||||
|
},
|
||||||
NestedMeta::Meta(syn::Meta::NameValue(nv)) => {
|
NestedMeta::Meta(syn::Meta::NameValue(nv)) => {
|
||||||
if nv.path.is_ident("guard") {
|
if nv.path.is_ident("guard") {
|
||||||
if let syn::Lit::Str(lit) = nv.lit {
|
if let syn::Lit::Str(lit) = nv.lit {
|
||||||
|
|
Loading…
Reference in New Issue