Skip to content

Commit e9988c1

Browse files
committed
Upper-cased exported statics
1 parent 1482cf5 commit e9988c1

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/libextra/base64.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ pub struct Config {
2929
}
3030

3131
/// Configuration for RFC 4648 standard base64 encoding
32-
pub static standard: Config =
32+
pub static STANDARD: Config =
3333
Config {char_set: Standard, pad: true, line_length: None};
3434

3535
/// Configuration for RFC 4648 base64url encoding
36-
pub static url_safe: Config =
36+
pub static URL_SAFE: Config =
3737
Config {char_set: UrlSafe, pad: false, line_length: None};
3838

3939
/// Configuration for RFC 2045 MIME base64 encoding
40-
pub static mime: Config =
40+
pub static MIME: Config =
4141
Config {char_set: Standard, pad: true, line_length: Some(76)};
4242

4343
static STANDARD_CHARS: [char, ..64] = [
@@ -286,33 +286,33 @@ impl<'self> FromBase64 for &'self str {
286286

287287
#[test]
288288
fn test_to_base64_basic() {
289-
assert_eq!("".to_base64(standard), ~"");
290-
assert_eq!("f".to_base64(standard), ~"Zg==");
291-
assert_eq!("fo".to_base64(standard), ~"Zm8=");
292-
assert_eq!("foo".to_base64(standard), ~"Zm9v");
293-
assert_eq!("foob".to_base64(standard), ~"Zm9vYg==");
294-
assert_eq!("fooba".to_base64(standard), ~"Zm9vYmE=");
295-
assert_eq!("foobar".to_base64(standard), ~"Zm9vYmFy");
289+
assert_eq!("".to_base64(STANDARD), ~"");
290+
assert_eq!("f".to_base64(STANDARD), ~"Zg==");
291+
assert_eq!("fo".to_base64(STANDARD), ~"Zm8=");
292+
assert_eq!("foo".to_base64(STANDARD), ~"Zm9v");
293+
assert_eq!("foob".to_base64(STANDARD), ~"Zm9vYg==");
294+
assert_eq!("fooba".to_base64(STANDARD), ~"Zm9vYmE=");
295+
assert_eq!("foobar".to_base64(STANDARD), ~"Zm9vYmFy");
296296
}
297297
298298
#[test]
299299
fn test_to_base64_line_break() {
300-
assert!(![0u8, 1000].to_base64(Config {line_length: None, ..standard})
300+
assert!(![0u8, 1000].to_base64(Config {line_length: None, ..STANDARD})
301301
.contains("\r\n"));
302-
assert_eq!("foobar".to_base64(Config {line_length: Some(4), ..standard}),
302+
assert_eq!("foobar".to_base64(Config {line_length: Some(4), ..STANDARD}),
303303
~"Zm9v\r\nYmFy");
304304
}
305305
306306
#[test]
307307
fn test_to_base64_padding() {
308-
assert_eq!("f".to_base64(Config {pad: false, ..standard}), ~"Zg");
309-
assert_eq!("fo".to_base64(Config {pad: false, ..standard}), ~"Zm8");
308+
assert_eq!("f".to_base64(Config {pad: false, ..STANDARD}), ~"Zg");
309+
assert_eq!("fo".to_base64(Config {pad: false, ..STANDARD}), ~"Zm8");
310310
}
311311
312312
#[test]
313313
fn test_to_base64_url_safe() {
314-
assert_eq!([251, 255].to_base64(url_safe), ~"-_8");
315-
assert_eq!([251, 255].to_base64(standard), ~"+/8=");
314+
assert_eq!([251, 255].to_base64(URL_SAFE), ~"-_8");
315+
assert_eq!([251, 255].to_base64(STANDARD), ~"+/8=");
316316
}
317317
318318
#[test]
@@ -359,6 +359,6 @@ fn test_base64_random() {
359359
push(random());
360360
}
361361
};
362-
assert_eq!(v.to_base64(standard).from_base64().get(), v);
362+
assert_eq!(v.to_base64(STANDARD).from_base64().get(), v);
363363
}
364364
}

0 commit comments

Comments
 (0)