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() {
/// println!("{}", i);
/// print!("{}", i);
/// }
/// println!("");
/// ```
///
/// This prints:
///
/// ```text
/// \
/// u
/// {
/// 2
/// 7
/// 6
/// 4
/// }
/// \u{2764}
/// ```
///
/// Collecting into a `String`: