mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
doc: improve escape_unicode example
Looks better without all that wasted whitespace
This commit is contained in:
parent
1671b9baec
commit
50de1d6e71
@ -188,21 +188,15 @@ impl char {
|
||||
///
|
||||
/// ```
|
||||
/// for i in '❤'.escape_unicode() {
|
||||
/// println!("{}", i);
|
||||
/// print!("{}", i);
|
||||
/// }
|
||||
/// println!("");
|
||||
/// ```
|
||||
///
|
||||
/// This prints:
|
||||
///
|
||||
/// ```text
|
||||
/// \
|
||||
/// u
|
||||
/// {
|
||||
/// 2
|
||||
/// 7
|
||||
/// 6
|
||||
/// 4
|
||||
/// }
|
||||
/// \u{2764}
|
||||
/// ```
|
||||
///
|
||||
/// Collecting into a `String`:
|
||||
|
Loading…
Reference in New Issue
Block a user