diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2011-05-16 18:21:22 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2011-05-16 18:21:22 -0700 |
| commit | fbbc1a77d242fafa1393127defa7ffec0bcb9e54 (patch) | |
| tree | ec83e08cb3fb8c95c24b7566ba8ab0904ced9aae /src/comp/pretty/pp.rs | |
| parent | ae030c5bf277e90b9aeea7e301fd3001f3a66b8d (diff) | |
Rewrite everything to use [] instead of vec() in value position.
Diffstat (limited to 'src/comp/pretty/pp.rs')
| -rw-r--r-- | src/comp/pretty/pp.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/comp/pretty/pp.rs b/src/comp/pretty/pp.rs index aff0843d27d..45b555439cd 100644 --- a/src/comp/pretty/pp.rs +++ b/src/comp/pretty/pp.rs @@ -31,9 +31,9 @@ type ps = @rec(mutable vec[context] context, mutable bool potential_brk); fn mkstate(io::writer out, uint width) -> ps { - let vec[context] stack = vec(rec(tp=cx_v, indent=0u)); - let vec[token] buff = vec(); - let vec[boxtype] sd = vec(); + let vec[context] stack = [rec(tp=cx_v, indent=0u)]; + let vec[token] buff = []; + let vec[boxtype] sd = []; ret @rec(mutable context=stack, width=width, out=out, @@ -81,7 +81,7 @@ fn direct_token(ps p, token tok) { } fn buffer_token(ps p, token tok) { - p.buffered += vec(tok); + p.buffered += [tok]; auto col = p.scancol; p.scancol = col + token_size(tok); if (p.scancol > p.width) { @@ -140,13 +140,13 @@ fn finish_scan(ps p, bool fits) { push_context(p, cx_h, base_indent(p) + ind); } } - p.scandepth = vec(); + p.scandepth = []; p.scanning = scan_none; for (token t in buf) { add_token(p, t); } } fn start_scan(ps p, token tok, scantype tp) { - p.buffered = vec(); + p.buffered = []; p.scancol = p.col; p.scanning = tp; buffer_token(p, tok); |
