Skip to content

Commit

Permalink
Clarify warning about String construction.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfbiedert committed Sep 6, 2023
1 parent 5129c68 commit 20bce3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5957,7 +5957,7 @@ If you **want** a string of type …
<sup>i</sup> Short form `x.into()` possible if type can be inferred. <br>
<sup>r</sup> Short form `x.as_ref()` possible if type can be inferred.

<sup>1</sup> You should, or must if call is `unsafe`, ensure raw data comes with a valid representation for the string type (e.g., UTF-8 data for a `String`).
<sup>1</sup> You must ensure raw data comes with a valid representation for the string type (e.g., UTF-8 data for a `String`).


<sup>2</sup> Only on some platforms `std::os::<your_os>::ffi::OsStrExt` exists with helper methods to get a raw `&[u8]` representation of the underlying `OsStr`. Use the rest of the table to go from there, e.g.:
Expand Down
1 change: 1 addition & 0 deletions static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const subtitles = [
"This is not the greatest cheat sheet in the world, no. This is just a tribute.",
"To improve CI times this site will only ship as a precompiled binary starting next week.",
"Aquaaaa<sup>riiiiiii<sup style='font-size:85%;'>uuuuuuuuuuus</sup></sup>",
"Rust is fast, somewhere between a snake and a mongoose.",
];


Expand Down

0 comments on commit 20bce3e

Please sign in to comment.