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

Some improvements to MetadataCommand #111

Merged
merged 2 commits into from Apr 29, 2020
Merged

Conversation

sunshowers
Copy link
Contributor

@sunshowers sunshowers commented Apr 28, 2020

  • Potentially reduce the number of clones required.
  • Make the exec method &self.

(The second one breaks API compat I believe, hope that's ok!)

This allows e.g. a `PathBuf` to be passed in without a
clone happening.
No reason for this to be `&mut`.
@@ -496,7 +496,7 @@ impl MetadataCommand {
}

/// Runs configured `cargo metadata` and returns parsed `Metadata`.
pub fn exec(&mut self) -> Result<Metadata> {
pub fn exec(&self) -> Result<Metadata> {
Copy link
Owner

@oli-obk oli-obk Apr 29, 2020

Choose a reason for hiding this comment

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

I understand the motiviation for this, but if it's not strictly necessary I'd like to withold it until the next major version bump. Please remove it from the PR and open an issue for it.

EDIT: well, actually all of this PR is a breaking change, but it's good changes, and unlikely to break anyone's use case. I think I'll just do another major bump soon.

@oli-obk oli-obk merged commit da4d25c into oli-obk:master Apr 29, 2020
@oli-obk
Copy link
Owner

oli-obk commented Apr 29, 2020

Thanks! Is there any pressure on your side to see this as a released version soon? Or are you ok with accumulating more changes over a while before releasing?

@sunshowers
Copy link
Contributor Author

No immediate pressure! Totally ok to wait a bit. Thanks for checking.

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

2 participants