1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2025-04-09 19:34:05 +00:00

fix: Build with stable rust

This commit is contained in:
DanSnow 2019-10-14 15:29:29 +08:00
parent cfd06a7b80
commit 33a19dc2c2
No known key found for this signature in database
GPG key ID: 2B25949174178EBD

View file

@ -69,15 +69,17 @@ impl Args {
let mut guards = Vec::new();
for arg in args {
match arg {
NestedMeta::Lit(syn::Lit::Str(lit)) if path.is_none() => {
path = Some(lit);
}
NestedMeta::Lit(syn::Lit::Str(lit)) if path.is_some() => {
return Err(syn::Error::new_spanned(
lit,
"Multiple paths specified! Should be only one!",
));
}
NestedMeta::Lit(syn::Lit::Str(lit)) => match path {
None => {
path = Some(lit);
}
_ => {
return Err(syn::Error::new_spanned(
lit,
"Multiple paths specified! Should be only one!",
));
}
},
NestedMeta::Meta(syn::Meta::NameValue(nv)) => {
if nv.path.is_ident("guard") {
if let syn::Lit::Str(lit) = nv.lit {