argh
argh copied to clipboard
Proc-macro derive produced unparseable tokens
This is the code I am using (full link):
#[derive(FromArgs, PartialEq, Debug)]
#[argh(
description = "used to search for crackmes (WARNING: Only gets first page of results)",
subcommand,
name = "search"
)]
pub struct SearchArgs {
#[argh(
description = "the range of difficulty (i.e. 1..6)",
from_str_fn(range_parser),
option,
default = "(1, 6)"
)]
pub difficulty: (u8, u8),
#[argh(
description = "the range of quality (i.e. 1..6)",
from_str_fn(range_parser),
option,
default = "(1, 6)"
)]
pub quality: (u8, u8),
#[argh(description = "name of crackme", option, default = "")]
pub name: String,
#[argh(description = "name of crackme's author", option, default = "")]
pub author: String,
#[argh(description = "language of crackme", option)]
pub language: Option<Language>,
#[argh(description = "platform of crackme", option)]
pub platform: Option<Platform>,
}
Errors:
error: expected expression, found `)`
--> src/cli.rs:18:10
|
18 | #[derive(FromArgs, PartialEq, Debug)]
| ^^^^^^^^
| |
| expected expression
| while parsing this struct
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: proc-macro derive produced unparseable tokens
--> src/cli.rs:18:10
|
18 | #[derive(FromArgs, PartialEq, Debug)]
| ^^^^^^^^