diff options
| author | Kevin Cantu <me@kevincantu.org> | 2012-01-25 00:53:17 -0800 |
|---|---|---|
| committer | Kevin Cantu <me@kevincantu.org> | 2012-01-25 00:53:17 -0800 |
| commit | c7b23f9a86fcdf328ebb349d9a5ad4e4c7dfe6ce (patch) | |
| tree | 96ba7443233c718f89e2ebaa5a673882ca7c2c33 /src/libcore | |
| parent | 9750e83a17a8f9f865eae757dcdccf374b1c82b7 (diff) | |
Replacing str::unsafe_from_bytes with str::from_bytes (part 1)
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/extfmt.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/extfmt.rs b/src/libcore/extfmt.rs index 38b36f59d32..a06e01f491e 100644 --- a/src/libcore/extfmt.rs +++ b/src/libcore/extfmt.rs @@ -440,6 +440,7 @@ mod rt { let head = s[0]; if head == '+' as u8 || head == '-' as u8 || head == ' ' as u8 { let headstr = str::unsafe_from_bytes([head]); + // FIXME: not UTF-8 safe let bytelen = str::byte_len(s); let numpart = str::substr(s, 1u, bytelen - 1u); ret headstr + padstr + numpart; |
