Convert vec::{grow, grow_fn, grow_set} to methods.

This commit is contained in:
Huon Wilson 2013-06-29 14:02:20 +10:00
parent 2eea642c30
commit a396e1e2e9
3 changed files with 48 additions and 68 deletions

View file

@ -69,9 +69,7 @@ fn AsciiArt(width: uint, height: uint, fill: char) -> AsciiArt {
// blank characters for each position in our canvas.
let mut lines = do vec::build_sized(height) |push| {
for height.times {
let mut line = ~[];
vec::grow_set(&mut line, width-1, &'.', '.');
push(line);
push(vec::from_elem(width, '.'));
}
};