Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Conversation

@soenkehahn
Copy link
Contributor

What do people think of this? This is using a tiny crate that I came up with yesterday: unsafe_get. We could also just put this into this project. But it seems generally useful. Should I put it on crates.io?

@matthandlersux @jondistad @data-pup @hallettj

@hallettj
Copy link
Contributor

I think it could be useful to have that crate available.

Copy link
Contributor

@matthandlersux matthandlersux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. IMO the macro name could be more descriptive, though. something like:

            get_enum_field!(
                parse_args_safe(vec!["program", "file"].into_iter().map(String::from))?,
                Args::Scriptkeeper,
                script_path
            )

@data-pup
Copy link
Contributor

this is really neat, I would endorse that as a separate crate for sure 🙂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants