doc: improve escape_unicode example

Looks better without all that wasted whitespace
This commit is contained in:
Tshepang Lekhonkhobe 2015-06-12 23:58:32 +02:00
parent 1671b9baec
commit 50de1d6e71

View File

@ -188,21 +188,15 @@ impl char {
/// ///
/// ``` /// ```
/// for i in '❤'.escape_unicode() { /// for i in '❤'.escape_unicode() {
/// println!("{}", i); /// print!("{}", i);
/// } /// }
/// println!("");
/// ``` /// ```
/// ///
/// This prints: /// This prints:
/// ///
/// ```text /// ```text
/// \ /// \u{2764}
/// u
/// {
/// 2
/// 7
/// 6
/// 4
/// }
/// ``` /// ```
/// ///
/// Collecting into a `String`: /// Collecting into a `String`: