Skip to content

Commit 2950152

Browse files
committed
Merge pull request #1 from danluu/silly_style_changes
Doc review, as requested :-).
2 parents 8e64b61 + 78bc10d commit 2950152

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/libstd/base64.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static CHARS: [char, ..64] = [
2828

2929
impl<'self> ToBase64 for &'self [u8] {
3030
/**
31-
* Turn a vector of `u8` bytes into a string representing them in base64.
31+
* Turn a vector of `u8` bytes into a base64 string.
3232
*
3333
* *Example*:
3434
*
@@ -92,7 +92,7 @@ impl<'self> ToBase64 for &'self [u8] {
9292
9393
impl<'self> ToBase64 for &'self str {
9494
/**
95-
* Convert any string (literal, `@`, `&`, `~`) to base64 encoding.
95+
* Convert any string (literal, `@`, `&`, or `~`) to base64 encoding.
9696
*
9797
*
9898
* *Example*:
@@ -119,8 +119,8 @@ pub trait FromBase64 {
119119
120120
impl FromBase64 for ~[u8] {
121121
/**
122-
* Turn a vector of `u8`s representing characters
123-
* encoding byte values in base64 into the vector of `u8` byte values.
122+
* Convert base64 `u8` vector into u8 byte values.
123+
* Every 4 encoded characters is converted into 3 octets, modulo padding.
124124
*
125125
* *Example*:
126126
*
@@ -200,16 +200,15 @@ impl FromBase64 for ~[u8] {
200200
201201
impl FromBase64 for ~str {
202202
/**
203-
* Convert any string (literal, `@`, `&`, `~`)
204-
* that contains a base64 encoded value, to the byte values it encodes.
203+
* Convert any base64 encoded string (literal, `@`, `&`, or `~`)
204+
* to the byte values it encodes.
205205
*
206206
* You can use the `from_bytes` function in `core::str`
207207
* to turn a `[u8]` into a string with characters corresponding to those values.
208208
*
209209
* *Example*:
210210
*
211-
* This is an example of going from a string literal to the base64 encoding
212-
* and back to the same string.
211+
* This converts a string literal to base64 and back.
213212
*
214213
* ~~~~
215214
* extern mod std;

0 commit comments

Comments
 (0)