Convert vec::{grow, grow_fn, grow_set} to methods.
This commit is contained in:
parent
2eea642c30
commit
a396e1e2e9
3 changed files with 48 additions and 68 deletions
|
|
@ -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, '.'));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue