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

&str->String in the docs #63797

Closed
axil opened this issue Aug 21, 2019 · 1 comment · Fixed by #64737
Closed

&str->String in the docs #63797

axil opened this issue Aug 21, 2019 · 1 comment · Fixed by #64737
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@axil
Copy link

axil commented Aug 21, 2019

This chunk was supposedly copy-pasted as is from std::str::from_utf8

rust/src/liballoc/string.rs

Lines 430 to 432 in bdfd698

/// Converts a vector of bytes to a `String`.
///
/// A string slice ([`&str`]) is made of bytes ([`u8`]), and a vector of bytes

It should read

A String ([`String`]) is made of bytes
@jonas-schievink jonas-schievink added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools labels Aug 21, 2019
@sam09
Copy link
Contributor

sam09 commented Aug 22, 2019

Hi there. Can I pick this up as first-timer task?

sam09 added a commit to sam09/rust that referenced this issue Sep 2, 2019
Change occurences of &str to String in src/liballoc/string.rs
Centril added a commit to Centril/rust that referenced this issue Sep 24, 2019
fix several issues in String docs

- In some places &str was shown instead of String.
- into_bytes is the reverse of from_utf8

Fixes rust-lang#63797

I've retaken the work done in this PR: rust-lang#63865 which for some reason was closed.
and just done a minor change (I hope you don't mind @sam09 ).
@bors bors closed this as completed in 62dc794 Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
3 participants