Skip to content

Commit 7550e45

Browse files
committed
libstd: Make ToBase64 take slices
1 parent 0c2674f commit 7550e45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/base64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ trait ToBase64 {
66
fn to_base64() -> ~str;
77
}
88

9-
impl ~[u8]: ToBase64 {
9+
impl &[u8]: ToBase64 {
1010
fn to_base64() -> ~str {
1111
let chars = str::chars(
1212
~"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
@@ -57,7 +57,7 @@ impl ~[u8]: ToBase64 {
5757
}
5858
}
5959

60-
impl ~str: ToBase64 {
60+
impl &str: ToBase64 {
6161
fn to_base64() -> ~str {
6262
str::to_bytes(self).to_base64()
6363
}

0 commit comments

Comments
 (0)