about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorLeah Hanson <astrieanna@gmail.com>2013-04-13 08:11:39 -0400
committerLeah Hanson <astrieanna@gmail.com>2013-04-13 08:11:39 -0400
commit8e64b61df9a9b22dc742fcd25f0533f5b4580477 (patch)
tree2e43d061c0849be80d816a2120add3db862eaf1e /src/libstd
parent27a0269501637d7fa27356caa9c13ab66fe5c8b0 (diff)
downloadrust-8e64b61df9a9b22dc742fcd25f0533f5b4580477.tar.gz
rust-8e64b61df9a9b22dc742fcd25f0533f5b4580477.zip
move rustdoc comments so that they attach to the functions rather than the impl blocks.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/base64.rs158
1 files changed, 79 insertions, 79 deletions
diff --git a/src/libstd/base64.rs b/src/libstd/base64.rs
index 618f5ecccf7..5b1e82ce1f0 100644
--- a/src/libstd/base64.rs
+++ b/src/libstd/base64.rs
@@ -26,22 +26,22 @@ static CHARS: [char, ..64] = [
     '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'
 ];
 
-/**
- * Turn a vector of `u8` bytes into a string representing them in base64.
- *
- * *Example*:
- *
- * ~~~~
- * extern mod std;
- * use std::base64::ToBase64;
- *
- * fn main () {
- *   let str = [52,32].to_base64();
- *   println(fmt!("%s", str));
- * }
- * ~~~~
- */
 impl<'self> ToBase64 for &'self [u8] {
+    /**
+     * Turn a vector of `u8` bytes into a string representing them in base64.
+     *
+     * *Example*:
+     *
+     * ~~~~
+     * extern mod std;
+     * use std::base64::ToBase64;
+     *
+     * fn main () {
+     *   let str = [52,32].to_base64();
+     *   println(fmt!("%s", str));
+     * }
+     * ~~~~
+     */
     fn to_base64(&self) -> ~str {
         let mut s = ~"";
         unsafe {
@@ -90,24 +90,24 @@ impl<'self> ToBase64 for &'self [u8] {
     }
 }
 
-/**
- * Convert any string (literal, `@`, `&`, `~`) to base64 encoding.
- *
- *
- * *Example*:
- *
- * ~~~~
- * extern mod std;
- * use std::base64::ToBase64;
- *
- * fn main () {
- *   let str = "Hello, World".to_base64();
- *   println(fmt!("%s",str));
- * }
- * ~~~~
- *
- */
 impl<'self> ToBase64 for &'self str {
+    /**
+     * Convert any string (literal, `@`, `&`, `~`) to base64 encoding.
+     *
+     *
+     * *Example*:
+     *
+     * ~~~~
+     * extern mod std;
+     * use std::base64::ToBase64;
+     *
+     * fn main () {
+     *   let str = "Hello, World".to_base64();
+     *   println(fmt!("%s",str));
+     * }
+     * ~~~~
+     *
+     */
     fn to_base64(&self) -> ~str {
         str::to_bytes(*self).to_base64()
     }
@@ -117,26 +117,26 @@ pub trait FromBase64 {
     fn from_base64(&self) -> ~[u8];
 }
 
-/**
- * Turn a vector of `u8`s representing characters
- * encoding byte values in base64 into the vector of `u8` byte values.
- *
- * *Example*:
- *
- * ~~~~
- * extern mod std;
- * use std::base64::ToBase64;
- * use std::base64::FromBase64;
- *
- * fn main () {
- *   let str = [52,32].to_base64();
- *   println(fmt!("%s", str));
- *   let bytes = str.from_base64();
- *   println(fmt!("%?",bytes));
- * }
- * ~~~~
- */
 impl FromBase64 for ~[u8] {
+    /**
+     * Turn a vector of `u8`s representing characters
+     * encoding byte values in base64 into the vector of `u8` byte values.
+     *
+     * *Example*:
+     *
+     * ~~~~
+     * extern mod std;
+     * use std::base64::ToBase64;
+     * use std::base64::FromBase64;
+     *
+     * fn main () {
+     *   let str = [52,32].to_base64();
+     *   println(fmt!("%s", str));
+     *   let bytes = str.from_base64();
+     *   println(fmt!("%?",bytes));
+     * }
+     * ~~~~
+     */
     fn from_base64(&self) -> ~[u8] {
         if self.len() % 4u != 0u { fail!(~"invalid base64 length"); }
 
@@ -198,35 +198,35 @@ impl FromBase64 for ~[u8] {
     }
 }
 
-/**
- * Convert any string (literal, `@`, `&`, `~`)
- * that contains a base64 encoded value, to the byte values it encodes.
- *
- * You can use the `from_bytes` function in `core::str`
- * to turn a `[u8]` into a string with characters corresponding to those values.
- *
- * *Example*:
- *
- * This is an example of going from a string literal to the base64 encoding
- * and back to the same string.
- *
- * ~~~~
- * extern mod std;
- * use std::base64::ToBase64;
- * use std::base64::FromBase64;
- * use core::str;
- *
- * fn main () {
- *   let hello_str = "Hello, World".to_base64();
- *   println(fmt!("%s",hello_str));
- *   let bytes = hello_str.from_base64();
- *   println(fmt!("%?",bytes));
- *   let result_str = str::from_bytes(bytes);
- *   println(fmt!("%s",result_str));
- * }
- * ~~~~
- */
 impl FromBase64 for ~str {
+    /**
+     * Convert any string (literal, `@`, `&`, `~`)
+     * that contains a base64 encoded value, to the byte values it encodes.
+     *
+     * You can use the `from_bytes` function in `core::str`
+     * to turn a `[u8]` into a string with characters corresponding to those values.
+     *
+     * *Example*:
+     *
+     * This is an example of going from a string literal to the base64 encoding
+     * and back to the same string.
+     *
+     * ~~~~
+     * extern mod std;
+     * use std::base64::ToBase64;
+     * use std::base64::FromBase64;
+     * use core::str;
+     *
+     * fn main () {
+     *   let hello_str = "Hello, World".to_base64();
+     *   println(fmt!("%s",hello_str));
+     *   let bytes = hello_str.from_base64();
+     *   println(fmt!("%?",bytes));
+     *   let result_str = str::from_bytes(bytes);
+     *   println(fmt!("%s",result_str));
+     * }
+     * ~~~~
+     */
     fn from_base64(&self) -> ~[u8] {
         str::to_bytes(*self).from_base64()
     }