diff options
| author | Kevin Ballard <[email protected]> | 2013-06-12 00:45:51 -0700 |
|---|---|---|
| committer | Kevin Ballard <[email protected]> | 2013-06-12 00:45:51 -0700 |
| commit | c393b2bc336f8535dc8eafced84465bbabe9842a (patch) | |
| tree | 8468f889971ed5613188630de030ebdfad823b4f /hex.rs | |
| parent | Don't error on `make clean` if there is no dylib (diff) | |
| download | rust-openssl-c393b2bc336f8535dc8eafced84465bbabe9842a.tar.xz rust-openssl-c393b2bc336f8535dc8eafced84465bbabe9842a.zip | |
Update for latest incoming (4a52ff0)
Diffstat (limited to 'hex.rs')
| -rw-r--r-- | hex.rs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -14,7 +14,7 @@ * limitations under the License. */ -use std::{str,uint,vec}; +use std::{uint,vec}; use std::iterator::*; pub trait ToHex { @@ -24,7 +24,7 @@ pub trait ToHex { impl<'self> ToHex for &'self [u8] { fn to_hex(&self) -> ~str { - let chars = str::to_chars("0123456789ABCDEF"); + let chars = "0123456789ABCDEF".iter().collect::<~[char]>(); let mut s = ~""; @@ -35,8 +35,8 @@ impl<'self> ToHex for &'self [u8] { let xhi = (x >> 4) & 0x0F; let xlo = (x ) & 0x0F; - str::push_char(&mut s, chars[xhi]); - str::push_char(&mut s, chars[xlo]); + s.push_char(chars[xhi]); + s.push_char(chars[xlo]); } s |