collections: Deprecate shift/unshift

Use insert/remove instead.
This commit is contained in:
Brian Anderson
2014-07-14 13:54:10 -07:00
parent 94e42c2d89
commit 9db1d35687
8 changed files with 10 additions and 8 deletions

View File

@@ -998,7 +998,7 @@ fn concat_flatten(x: Ast, y: Ast) -> Ast {
match (x, y) {
(Cat(mut xs), Cat(ys)) => { xs.push_all_move(ys); Cat(xs) }
(Cat(mut xs), ast) => { xs.push(ast); Cat(xs) }
(ast, Cat(mut xs)) => { xs.unshift(ast); Cat(xs) }
(ast, Cat(mut xs)) => { xs.insert(0, ast); Cat(xs) }
(ast1, ast2) => Cat(vec!(ast1, ast2)),
}
}