diff options
| author | bors <bors@rust-lang.org> | 2015-01-02 02:31:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-02 02:31:12 +0000 |
| commit | cd614164e692cca3a1460737f581fcb6d4630baf (patch) | |
| tree | 9543983dc912f84eb6c12a1db4531c17c280388e /src/libserialize | |
| parent | 39d74026663597a8d4ad0ab04e6d117bf9fd6ad4 (diff) | |
| parent | 2c92ddeda7e2a8e9b6d6b629818eacdb96787575 (diff) | |
| download | rust-cd614164e692cca3a1460737f581fcb6d4630baf.tar.gz rust-cd614164e692cca3a1460737f581fcb6d4630baf.zip | |
auto merge of #20387 : nick29581/rust/arrays-2, r=alexcrichton
Closes #19999
Diffstat (limited to 'src/libserialize')
| -rw-r--r-- | src/libserialize/base64.rs | 4 | ||||
| -rw-r--r-- | src/libserialize/json.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libserialize/base64.rs b/src/libserialize/base64.rs index fae73cc834f..54b390e0c3f 100644 --- a/src/libserialize/base64.rs +++ b/src/libserialize/base64.rs @@ -314,7 +314,7 @@ mod tests { #[test] fn test_to_base64_crlf_line_break() { - assert!(![0u8, ..1000].to_base64(Config {line_length: None, ..STANDARD}) + assert!(![0u8; 1000].to_base64(Config {line_length: None, ..STANDARD}) .contains("\r\n")); assert_eq!(b"foobar".to_base64(Config {line_length: Some(4), ..STANDARD}), @@ -323,7 +323,7 @@ mod tests { #[test] fn test_to_base64_lf_line_break() { - assert!(![0u8, ..1000].to_base64(Config {line_length: None, + assert!(![0u8; 1000].to_base64(Config {line_length: None, newline: Newline::LF, ..STANDARD}) .as_slice() diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index 3f0d59c319a..8a9c2eebf3a 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -392,14 +392,14 @@ fn escape_str(writer: &mut io::Writer, v: &str) -> Result<(), io::IoError> { } fn escape_char(writer: &mut io::Writer, v: char) -> Result<(), io::IoError> { - let mut buf = [0, .. 4]; + let mut buf = [0; 4]; let len = v.encode_utf8(&mut buf).unwrap(); escape_bytes(writer, buf[mut ..len]) } fn spaces(wr: &mut io::Writer, mut n: uint) -> Result<(), io::IoError> { const LEN: uint = 16; - static BUF: [u8, ..LEN] = [b' ', ..LEN]; + static BUF: [u8; LEN] = [b' '; LEN]; while n >= LEN { try!(wr.write(&BUF)); |
