about summary refs log tree commit diff
path: root/src/libserialize
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserialize')
-rw-r--r--src/libserialize/base64.rs4
-rw-r--r--src/libserialize/hex.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libserialize/base64.rs b/src/libserialize/base64.rs
index 5e8648d355e..9a30e87647a 100644
--- a/src/libserialize/base64.rs
+++ b/src/libserialize/base64.rs
@@ -11,8 +11,8 @@
 // ignore-lexer-test FIXME #15679
 
 //! Base64 binary-to-text encoding
-use std::str;
 use std::fmt;
+use std::string;
 
 /// Available encoding character sets
 pub enum CharacterSet {
@@ -148,7 +148,7 @@ impl<'a> ToBase64 for &'a [u8] {
         }
 
         unsafe {
-            str::raw::from_utf8_owned(v)
+            string::raw::from_utf8(v)
         }
     }
 }
diff --git a/src/libserialize/hex.rs b/src/libserialize/hex.rs
index d6a029c583c..fa5b3ca4040 100644
--- a/src/libserialize/hex.rs
+++ b/src/libserialize/hex.rs
@@ -11,8 +11,8 @@
 // ignore-lexer-test FIXME #15679
 
 //! Hex binary-to-text encoding
-use std::str;
 use std::fmt;
+use std::string;
 
 /// A trait for converting a value to hexadecimal encoding
 pub trait ToHex {
@@ -47,7 +47,7 @@ impl<'a> ToHex for &'a [u8] {
         }
 
         unsafe {
-            str::raw::from_utf8_owned(v)
+            string::raw::from_utf8(v)
         }
     }
 }