diff options
| author | Michael Sullivan <sully@msully.net> | 2012-07-06 11:35:46 -0700 |
|---|---|---|
| committer | Michael Sullivan <sully@msully.net> | 2012-07-06 13:37:56 -0700 |
| commit | ee0177b9082ffc2521141c615d332a994708c8a2 (patch) | |
| tree | 154199bcd36208b4a39bdf40dd543e2bc75dc1d1 /src/libcore/char.rs | |
| parent | 8c64a98d657b27a6b324547eca78c032d191e33e (diff) | |
| download | rust-ee0177b9082ffc2521141c615d332a994708c8a2.tar.gz rust-ee0177b9082ffc2521141c615d332a994708c8a2.zip | |
Move string append to libraries. Closes #2710.
Diffstat (limited to 'src/libcore/char.rs')
| -rw-r--r-- | src/libcore/char.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/char.rs b/src/libcore/char.rs index 28645df1b46..d68800a96fc 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -139,9 +139,9 @@ fn escape_unicode(c: char) -> str { else { ('U', 8u) }); assert str::len(s) <= pad; let mut out = "\\"; - out += str::from_char(c); - for uint::range(str::len(s), pad) |_i| { out += "0"; } - out += s; + str::push_str(out, str::from_char(c)); + for uint::range(str::len(s), pad) |_i| { str::push_str(out, "0"); } + str::push_str(out, s); ret out; } |
