about summary refs log tree commit diff
path: root/src/libserialize/base64.rs
diff options
context:
space:
mode:
authorRicho Healey <richo@psych0tik.net>2014-05-25 03:17:19 -0700
committerRicho Healey <richo@psych0tik.net>2014-05-27 12:59:31 -0700
commit1f1b2e42d76ba1cd884adc49922636a6c2ac1b2f (patch)
tree2a56d5ceda84c1a58796fe0fc4e7cea38a9336f6 /src/libserialize/base64.rs
parent4348e23b269739657d934b532ad061bfd6d92309 (diff)
std: Rename strbuf operations to string
[breaking-change]
Diffstat (limited to 'src/libserialize/base64.rs')
-rw-r--r--src/libserialize/base64.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/libserialize/base64.rs b/src/libserialize/base64.rs
index 61ba36eeb1f..5d2f229beb6 100644
--- a/src/libserialize/base64.rs
+++ b/src/libserialize/base64.rs
@@ -146,7 +146,7 @@ impl<'a> ToBase64 for &'a [u8] {
         }
 
         unsafe {
-            str::raw::from_utf8(v.as_slice()).to_strbuf()
+            str::raw::from_utf8(v.as_slice()).to_string()
         }
     }
 }
@@ -267,13 +267,13 @@ mod tests {
 
     #[test]
     fn test_to_base64_basic() {
-        assert_eq!("".as_bytes().to_base64(STANDARD), "".to_strbuf());
-        assert_eq!("f".as_bytes().to_base64(STANDARD), "Zg==".to_strbuf());
-        assert_eq!("fo".as_bytes().to_base64(STANDARD), "Zm8=".to_strbuf());
-        assert_eq!("foo".as_bytes().to_base64(STANDARD), "Zm9v".to_strbuf());
-        assert_eq!("foob".as_bytes().to_base64(STANDARD), "Zm9vYg==".to_strbuf());
-        assert_eq!("fooba".as_bytes().to_base64(STANDARD), "Zm9vYmE=".to_strbuf());
-        assert_eq!("foobar".as_bytes().to_base64(STANDARD), "Zm9vYmFy".to_strbuf());
+        assert_eq!("".as_bytes().to_base64(STANDARD), "".to_string());
+        assert_eq!("f".as_bytes().to_base64(STANDARD), "Zg==".to_string());
+        assert_eq!("fo".as_bytes().to_base64(STANDARD), "Zm8=".to_string());
+        assert_eq!("foo".as_bytes().to_base64(STANDARD), "Zm9v".to_string());
+        assert_eq!("foob".as_bytes().to_base64(STANDARD), "Zm9vYg==".to_string());
+        assert_eq!("fooba".as_bytes().to_base64(STANDARD), "Zm9vYmE=".to_string());
+        assert_eq!("foobar".as_bytes().to_base64(STANDARD), "Zm9vYmFy".to_string());
     }
 
     #[test]
@@ -283,19 +283,19 @@ mod tests {
                               .contains("\r\n"));
         assert_eq!("foobar".as_bytes().to_base64(Config {line_length: Some(4),
                                                          ..STANDARD}),
-                   "Zm9v\r\nYmFy".to_strbuf());
+                   "Zm9v\r\nYmFy".to_string());
     }
 
     #[test]
     fn test_to_base64_padding() {
-        assert_eq!("f".as_bytes().to_base64(Config {pad: false, ..STANDARD}), "Zg".to_strbuf());
-        assert_eq!("fo".as_bytes().to_base64(Config {pad: false, ..STANDARD}), "Zm8".to_strbuf());
+        assert_eq!("f".as_bytes().to_base64(Config {pad: false, ..STANDARD}), "Zg".to_string());
+        assert_eq!("fo".as_bytes().to_base64(Config {pad: false, ..STANDARD}), "Zm8".to_string());
     }
 
     #[test]
     fn test_to_base64_url_safe() {
-        assert_eq!([251, 255].to_base64(URL_SAFE), "-_8".to_strbuf());
-        assert_eq!([251, 255].to_base64(STANDARD), "+/8=".to_strbuf());
+        assert_eq!([251, 255].to_base64(URL_SAFE), "-_8".to_string());
+        assert_eq!([251, 255].to_base64(STANDARD), "+/8=".to_string());
     }
 
     #[test]