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:
parent
cfd06a7b80
commit
33a19dc2c2
1 changed files with 11 additions and 9 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue