@@ -13,11 +13,11 @@ use core::str;
1313use core:: vec;
1414
1515pub trait ToBase64 {
16- pure fn to_base64 ( & self ) -> ~str ;
16+ fn to_base64 ( & self ) -> ~str ;
1717}
1818
1919impl ToBase64 for & ' self [ u8 ] {
20- pure fn to_base64( & self ) -> ~str {
20+ fn to_base64( & self ) -> ~str {
2121 let chars = str:: chars (
2222 ~"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 +/"
2323 ) ;
@@ -70,17 +70,17 @@ impl ToBase64 for &'self [u8] {
7070}
7171
7272impl ToBase64 for &'self str {
73- pure fn to_base64(&self) -> ~str {
73+ fn to_base64(&self) -> ~str {
7474 str::to_bytes(*self).to_base64()
7575 }
7676}
7777
7878pub trait FromBase64 {
79- pure fn from_base64(&self) -> ~[u8];
79+ fn from_base64(&self) -> ~[u8];
8080}
8181
8282impl FromBase64 for ~[u8] {
83- pure fn from_base64(&self) -> ~[u8] {
83+ fn from_base64(&self) -> ~[u8] {
8484 if self.len() % 4u != 0u { fail!(~" invalid base64 length"); }
8585
8686 let len = self.len();
@@ -142,7 +142,7 @@ impl FromBase64 for ~[u8] {
142142}
143143
144144impl FromBase64 for ~str {
145- pure fn from_base64(&self) -> ~[u8] {
145+ fn from_base64(&self) -> ~[u8] {
146146 str::to_bytes(*self).from_base64()
147147 }
148148}
0 commit comments