Skip to content

Use stable code in doc examples (libcollections)#25588

Merged
bors merged 3 commits intorust-lang:masterfrom
bluss:doc-string-from
May 20, 2015
Merged

Use stable code in doc examples (libcollections)#25588
bors merged 3 commits intorust-lang:masterfrom
bluss:doc-string-from

Conversation

@bluss
Copy link
Contributor

@bluss bluss commented May 19, 2015

Use stable code in doc examples (libcollections)

Main task is to change from String::from_str to String::from in examples for String
(the latter constructor is stable). While I'm at it, also remove redundant feature flags,
fix some other instances of unstable code in examples (in examples for stable
methods), and remove some use of usize in examples too.

Ulrik Sverdrup added 3 commits May 19, 2015 03:33
Prefer String::from over from_str; String::from_str is unstable while
String::from is stable. Promote the latter by using it in examples.

Simply migrating unstable function to the closest alternative.
@bluss
Copy link
Contributor Author

bluss commented May 19, 2015

r? @steveklabnik

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (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. 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 CONTRIBUTING.md for more information.

@alexcrichton
Copy link
Member

@bors: r+ 93701b3

Thanks!

@bors
Copy link
Collaborator

bors commented May 20, 2015

⌛ Testing commit 93701b3 with merge 720735b...

bors added a commit that referenced this pull request May 20, 2015
Use stable code in doc examples (libcollections)

Main task is to change from String::from_str to String::from in examples for String
(the latter constructor is stable). While I'm at it, also remove redundant feature flags,
fix some other instances of unstable code in examples (in examples for stable
methods), and remove some use of usize in examples too.
@bors bors merged commit 93701b3 into rust-lang:master May 20, 2015
@bluss bluss deleted the doc-string-from branch May 20, 2015 10:17
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.

6 participants