about summary refs log tree commit diff
path: root/src/libserialize/base64.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserialize/base64.rs')
-rw-r--r--src/libserialize/base64.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libserialize/base64.rs b/src/libserialize/base64.rs
index 9b1e285431f..41feee8257f 100644
--- a/src/libserialize/base64.rs
+++ b/src/libserialize/base64.rs
@@ -16,7 +16,6 @@ pub use self::FromBase64Error::*;
 pub use self::CharacterSet::*;
 
 use std::fmt;
-use std::string;
 use std::error;
 
 /// Available encoding character sets
@@ -152,9 +151,7 @@ impl ToBase64 for [u8] {
             _ => panic!("Algebra is broken, please alert the math police")
         }
 
-        unsafe {
-            string::raw::from_utf8(v)
-        }
+        unsafe { String::from_utf8_unchecked(v) }
     }
 }
 
@@ -201,8 +198,8 @@ impl FromBase64 for str {
      * Convert any base64 encoded string (literal, `@`, `&`, or `~`)
      * to the byte values it encodes.
      *
-     * You can use the `String::from_utf8` function in `std::string` to turn a
-     * `Vec<u8>` into a string with characters corresponding to those values.
+     * You can use the `String::from_utf8` function to turn a `Vec<u8>` into a
+     * string with characters corresponding to those values.
      *
      * # Example
      *