Skip to content

Conversation

@AleksanderZdunek
Copy link
Contributor

Silence dead code warning when building lib with --no-default-features.

Silence dead code warning when building lib with --no-default-features.
@ryankurte
Copy link
Owner

hey thanks for the PR! perhaps rather than exporting it would make sense to feature gate the function with #[cfg(feature = "structopt")]?

@AleksanderZdunek
Copy link
Contributor Author

I have a copy of that function in my command line application because I used yours as an example and needed to parse the pid in the same way. So it makes some kind of sense to me to provide it by the lib.
I don't know which alternative is better.

@ryankurte
Copy link
Owner

ahh interesting, and you weren't able to include the filters object directly with a #[clap(flatten)] attribute to un-nest it? (though it looks like i'm overdue a swap from structopt to clap).

if that doesn't work for you then yeah lets export it, but it'd be great to have a comment there on what it's for / why.

@AleksanderZdunek
Copy link
Contributor Author

Added a documentation comment for u16_parse_hex().

Flattening the filters object wouldn't work anyway when building with default-features = false. I have no need to build the example application in production.
If it was me I would have probably tried to separate the command line helpers from the backend library, but that's a different matter. :)

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

Successfully merging this pull request may close these issues.

2 participants