Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

error[E0277]: the trait bound Args: ParseArgs is not satisfied #15

Open
Boscop opened this issue Apr 28, 2021 · 1 comment
Open

error[E0277]: the trait bound Args: ParseArgs is not satisfied #15

Boscop opened this issue Apr 28, 2021 · 1 comment

Comments

@Boscop
Copy link

Boscop commented Apr 28, 2021

Thanks for this crate. It works in one of my crates where main returns anyhow::Result<()>.
But why doesn't this work? :)

error[E0277]: the trait bound `Args: ParseArgs` is not satisfied
   --> src\main.rs:287:1
    |
287 | #[paw::main]
    | ^^^^^^^^^^^^ the trait `ParseArgs` is not implemented for `Args`
    |
    = note: required by `parse_args`
#[derive(StructOpt, Debug)]
struct Args {
	// ...
}

#[paw::main]
fn main(args: Args) -> Result<(), Box<dyn Error>> {
	// ...
}
@Cthutu
Copy link

Cthutu commented Jul 23, 2021

You need to add the paw feature to structopt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants