Skip to content

Commit 18c359b

Browse files
committed
---
yaml --- r: 137697 b: refs/heads/auto c: d3eaf32 h: refs/heads/master i: 137695: e352483 v: v3
1 parent 8cf725d commit 18c359b

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: edf88416426d82d0099fc888e443bf21feeb1f04
16+
refs/heads/auto: d3eaf3290048a9da680b2c13b158fd6aeb307902
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libserialize/json.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -360,18 +360,16 @@ fn escape_char(writer: &mut io::Writer, v: char) -> Result<(), io::IoError> {
360360
}
361361

362362
fn spaces(wr: &mut io::Writer, mut n: uint) -> Result<(), io::IoError> {
363-
#[allow(non_uppercase_statics)]
364-
static len: uint = 16;
365-
#[allow(non_uppercase_statics)]
366-
static buf: [u8, ..len] = [b' ', ..len];
363+
const LEN: uint = 16;
364+
static BUF: [u8, ..LEN] = [b' ', ..LEN];
367365

368-
while n >= len {
369-
try!(wr.write(buf));
370-
n -= len;
366+
while n >= LEN {
367+
try!(wr.write(BUF));
368+
n -= LEN;
371369
}
372370

373371
if n > 0 {
374-
wr.write(buf[..n])
372+
wr.write(BUF[..n])
375373
} else {
376374
Ok(())
377375
}

0 commit comments

Comments
 (0)