Rollup merge of #32441 - tshepang:doc-primitive, r=steveklabnik
doc: small char improvements
This commit is contained in:
commit
7f2612e66c
1 changed files with 3 additions and 3 deletions
|
@ -77,7 +77,7 @@ mod prim_bool { }
|
||||||
/// # Representation
|
/// # Representation
|
||||||
///
|
///
|
||||||
/// `char` is always four bytes in size. This is a different representation than
|
/// `char` is always four bytes in size. This is a different representation than
|
||||||
/// a given character would have as part of a [`String`], for example:
|
/// a given character would have as part of a [`String`]. For example:
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// let v = vec!['h', 'e', 'l', 'l', 'o'];
|
/// let v = vec!['h', 'e', 'l', 'l', 'o'];
|
||||||
|
@ -116,8 +116,8 @@ mod prim_bool { }
|
||||||
/// ^~
|
/// ^~
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Another implication of the 4-byte fixed size of a `char`, is that
|
/// Another implication of the 4-byte fixed size of a `char` is that
|
||||||
/// per-`char`acter processing can end up using a lot more memory:
|
/// per-`char` processing can end up using a lot more memory:
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// let s = String::from("love: ❤️");
|
/// let s = String::from("love: ❤️");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue