-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add field private
to Cargo.toml
#2218
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @huonw (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@@ -204,6 +207,7 @@ impl Manifest { | |||
pub fn version(&self) -> &Version { self.package_id().version() } | |||
pub fn warnings(&self) -> &[String] { &self.warnings } | |||
pub fn profiles(&self) -> &Profiles { &self.profiles } | |||
pub fn private(&self) -> &bool { &self.private } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok for this to just return a bool
instead of &bool
because it's a Copy
type
cc @erickt |
Wonderful! Thanks for implementing this! |
I chatted with @wycats about this on IRC for a moment, and some interesting ideas came up:
|
What do you think about "publishable"? I think "private", "allow-publish" or "publishable" should be ok... |
what about a |
That sounds ok, but what happens when |
I have a suggestion: what about making |
@tomaka I'm not sure about this, I think most of the people would prefer to have it the other way. |
Thanks @JanLikar! Could you also squash into one commit? Also feel free to ping a PR whenever it's updated as unfortunately github doesn't send notifications out for that :( |
496a7c8
to
84992f1
Compare
@alexcrichton I did it thanks to @steveklabnik. |
Oh dear, was a commit lost? Right now this only contains the doc changes? |
I don't know how this happened... |
You should be able to use |
It looked to me like the original branch had just one commit; that's my fault. I have them locally, let me push up a branch. |
84992f1
to
a773e1c
Compare
Could you do a fetch plus a |
a773e1c
to
f8084b0
Compare
@alexcrichton I'm sorry, I messed something up, so the PR was closed automatically. Here's the new PR #2321. |
private
can be used to prevent a package from being accidentally published to crates.io.[Fix #2202]