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

Is there an ergonomic way to make Flagset<T> from Vec<T>? #21

Closed
3tilley opened this issue Jan 14, 2022 · 1 comment
Closed

Is there an ergonomic way to make Flagset<T> from Vec<T>? #21

3tilley opened this issue Jan 14, 2022 · 1 comment

Comments

@3tilley
Copy link

3tilley commented Jan 14, 2022

Hello,

I'm a Rust newbie so apologies if this is more a language question than one for your crate, but am I missing an ergonomic way of taking a vec/iterable/arr/slice of T and making it into FlagSet?

I've taken inspiration from what someone did here here and made a free function, but just wanted to know if I was missing something obvious.

There is a line here which hints why you might want to make your own container, but tbh I didn't really understand the tradeoffs. Is there something special on function APIs that means you wouldn't want to just use Flagset directly?

@otrho
Copy link

otrho commented May 25, 2022

I was just wondering something similar. It might be worth implementing Extend to be able to gather a collection of FlagSets into a single set. But I am also a bit new to this and am not sure. 🙂

@dpal dpal added this to Enarx Board Jan 26, 2023
rjzak added a commit to rjzak/flagset that referenced this issue Mar 3, 2024
rjzak added a commit to rjzak/flagset that referenced this issue Mar 3, 2024
@rjzak rjzak closed this as completed in 8d123cb Mar 3, 2024
@github-project-automation github-project-automation bot moved this from New to Done in Enarx Board Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants