Skip to content

doc: fix swapped docs for intro_ptr and intro_raw of CString #28788

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

Merged
merged 2 commits into from
Oct 2, 2015
Merged

doc: fix swapped docs for intro_ptr and intro_raw of CString #28788

merged 2 commits into from
Oct 2, 2015

Conversation

tsurai
Copy link
Contributor

@tsurai tsurai commented Oct 1, 2015

Please correct me if I confused something but the documentation for into_ptr and into_raw of CString seem to be swapped as the docs for into_ptr mentions into_raw and vice versa.

Update: I actually meant into_ptr and into_raw NOT from_*

@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@bluss
Copy link
Member

bluss commented Oct 1, 2015

Since from_ptr is deprecated, both should really say from_raw.

@tsurai
Copy link
Contributor Author

tsurai commented Oct 1, 2015

I thought that it's better for the deprecated from_ptr and to_ptr functions to stay the same for developers to know what they originally did and to avoid confusion.

But do you agree that the documentation as it is now is inconsistent? Especially considering the documentation of to_ptr and to_raw.
I can change the documentation to always refer to the *_raw functions if you think it's better that way.

@bluss
Copy link
Member

bluss commented Oct 1, 2015

I think it's better. Either way, the unstable & deprecated methods will be removed relatively quickly.

@tsurai
Copy link
Contributor Author

tsurai commented Oct 1, 2015

There certainly is no reason why the into_raw method should only mention into_ptr in its documentation. Especially when the deprecated methods get removed.

Edit: edited the initial comment because I confused into_* and from_*. The Problem I was refering to was the documentation of the into_* methods

@tsurai tsurai changed the title doc: fix swapped docs for from_ptr and from_raw of CString doc: fix swapped docs for intro_ptr and intro_raw of CString Oct 1, 2015
@bluss
Copy link
Member

bluss commented Oct 1, 2015

@bors r+ rollup

Great, let's go!

@bors
Copy link
Collaborator

bors commented Oct 1, 2015

📌 Commit 25c2134 has been approved by bluss

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Oct 1, 2015
Please correct me if I confused something but the documentation for ```into_ptr``` and ```into_raw``` of ```CString``` seem to be swapped as the docs for ```into_ptr``` mentions ```into_raw``` and vice versa.

Update: I actually meant ```into_ptr``` and ```into_raw``` NOT ```from_*```
bors added a commit that referenced this pull request Oct 2, 2015
Manishearth added a commit to Manishearth/rust that referenced this pull request Oct 2, 2015
Please correct me if I confused something but the documentation for ```into_ptr``` and ```into_raw``` of ```CString``` seem to be swapped as the docs for ```into_ptr``` mentions ```into_raw``` and vice versa.

Update: I actually meant ```into_ptr``` and ```into_raw``` NOT ```from_*```
bors added a commit that referenced this pull request Oct 2, 2015
@bors bors merged commit 25c2134 into rust-lang:master Oct 2, 2015
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.

5 participants