Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing closures to add_command? #106

Open
MarkLagodych opened this issue Dec 12, 2021 · 1 comment
Open

Passing closures to add_command? #106

MarkLagodych opened this issue Dec 12, 2021 · 1 comment

Comments

@MarkLagodych
Copy link

Currently, only functions can be passed to add_command. I think it would be more useful if closures were accepted too. Could you please implement this functionality?

@wduquette
Copy link
Owner

Hi, Mark!

I implemented it using functions because I could figure out how to do it with functions without running afoul of the borrow checker. (I'm still at best an intermediate Rust programmer.) You're welcome to fork Molt and give it a try, though.

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

No branches or pull requests

2 participants