Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit e773de5

Browse files
committed
Merge pull request #10 from vhbit/array-syntax
Array syntax fallout
2 parents cc164a2 + a989003 commit e773de5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/base64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ mod tests {
314314

315315
#[test]
316316
fn test_to_base64_crlf_line_break() {
317-
assert!(![0u8, ..1000].to_base64(Config {line_length: None, ..STANDARD})
317+
assert!(![0u8; 1000].to_base64(Config {line_length: None, ..STANDARD})
318318
.contains("\r\n"));
319319
assert_eq!(b"foobar".to_base64(Config {line_length: Some(4),
320320
..STANDARD}),
@@ -323,7 +323,7 @@ mod tests {
323323

324324
#[test]
325325
fn test_to_base64_lf_line_break() {
326-
assert!(![0u8, ..1000].to_base64(Config {line_length: None,
326+
assert!(![0u8; 1000].to_base64(Config {line_length: None,
327327
newline: Newline::LF,
328328
..STANDARD})
329329
.as_slice()

src/json.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,14 +391,14 @@ fn escape_str(writer: &mut io::Writer, v: &str) -> Result<(), io::IoError> {
391391
}
392392

393393
fn escape_char(writer: &mut io::Writer, v: char) -> Result<(), io::IoError> {
394-
let mut buf = [0, .. 4];
394+
let mut buf = [0; 4];
395395
let len = v.encode_utf8(&mut buf).unwrap();
396396
escape_bytes(writer, buf[mut ..len])
397397
}
398398

399399
fn spaces(wr: &mut io::Writer, mut n: uint) -> Result<(), io::IoError> {
400400
const LEN: uint = 16;
401-
static BUF: [u8, ..LEN] = [b' ', ..LEN];
401+
static BUF: [u8; LEN] = [b' '; LEN];
402402

403403
while n >= LEN {
404404
try!(wr.write(&BUF));

0 commit comments

Comments
 (0)