aboutsummaryrefslogtreecommitdiff
path: root/hex.rs
diff options
context:
space:
mode:
authorKevin Ballard <[email protected]>2013-06-12 00:45:51 -0700
committerKevin Ballard <[email protected]>2013-06-12 00:45:51 -0700
commitc393b2bc336f8535dc8eafced84465bbabe9842a (patch)
tree8468f889971ed5613188630de030ebdfad823b4f /hex.rs
parentDon't error on `make clean` if there is no dylib (diff)
downloadrust-openssl-c393b2bc336f8535dc8eafced84465bbabe9842a.tar.xz
rust-openssl-c393b2bc336f8535dc8eafced84465bbabe9842a.zip
Update for latest incoming (4a52ff0)
Diffstat (limited to 'hex.rs')
-rw-r--r--hex.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/hex.rs b/hex.rs
index 415b86cd..8f1c8ba5 100644
--- a/hex.rs
+++ b/hex.rs
@@ -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