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

[REFACTOR] Remove some lifetimes to simplify Docker exporter #7660

Merged
merged 2 commits into from
May 5, 2020

Conversation

christophermaier
Copy link
Contributor

These lifetime parameters were added to allow us to hold onto str
references from our Clap ArgMatches. However, this ends up
implicitly coupling all of our types to choices made by our CLI
library. Also, there's no real benefit to not allocating a few extra
Strings in a short-lived CLI application like this, so there's no
reason to carry around the extra cognitive overhead.

Signed-off-by: Christopher Maier cmaier@chef.io

These lifetime parameters were added to allow us to hold onto `str`
references from our Clap `ArgMatches`. However, this ends up
implicitly coupling all of our types to choices made by our CLI
library. Also, there's no real benefit to not allocating a few extra
Strings in a short-lived CLI application like this, so there's no
reason to carry around the extra cognitive overhead.

Signed-off-by: Christopher Maier <cmaier@chef.io>
components/pkg-export-docker/src/build.rs Outdated Show resolved Hide resolved
components/pkg-export-docker/src/build.rs Show resolved Hide resolved
Signed-off-by: Christopher Maier <cmaier@chef.io>
@christophermaier christophermaier merged commit ddd0560 into master May 5, 2020
@chef-expeditor chef-expeditor bot deleted the cm/remove-lifetime-parameters branch May 5, 2020 13:21
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.

None yet

3 participants