diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-06-13 18:03:56 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-06-13 18:03:56 +0530 |
| commit | 023f66103d5d245cfa6c900e13ef7f5f4dd80520 (patch) | |
| tree | f92102ca7db679f008e2d648b4f028606ea8fc3b | |
| parent | 4935ea92b1b1df471dd594477395030b4cdea233 (diff) | |
| parent | 2c08654e0936f6b6ecd174a6b261854effec30b9 (diff) | |
Rollup merge of #26260 - tshepang:improve-example, r=steveklabnik
| -rw-r--r-- | src/librustc_unicode/char.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/librustc_unicode/char.rs b/src/librustc_unicode/char.rs index fb5913537b2..a7ced76e10c 100644 --- a/src/librustc_unicode/char.rs +++ b/src/librustc_unicode/char.rs @@ -187,22 +187,16 @@ impl char { /// # Examples /// /// ``` - /// for i in '❤'.escape_unicode() { - /// println!("{}", i); + /// for c in '❤'.escape_unicode() { + /// print!("{}", c); /// } + /// println!(""); /// ``` /// /// This prints: /// /// ```text - /// \ - /// u - /// { - /// 2 - /// 7 - /// 6 - /// 4 - /// } + /// \u{2764} /// ``` /// /// Collecting into a `String`: |
