1
Fork 0

Remove OneVector

This commit is contained in:
ljedrz 2018-08-30 11:42:16 +02:00
parent beff387601
commit 130a32fa72
22 changed files with 134 additions and 177 deletions

View file

@ -17,7 +17,7 @@ use parse::{token, DirectoryOwnership};
use parse;
use print::pprust;
use ptr::P;
use OneVector;
use smallvec::SmallVec;
use symbol::Symbol;
use tokenstream;
@ -110,9 +110,9 @@ pub fn expand_include<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[tokenstream::T
fn make_expr(mut self: Box<ExpandResult<'a>>) -> Option<P<ast::Expr>> {
Some(panictry!(self.p.parse_expr()))
}
fn make_items(mut self: Box<ExpandResult<'a>>)
-> Option<OneVector<P<ast::Item>>> {
let mut ret = OneVector::new();
fn make_items(mut self: Box<ExpandResult<'a>>) -> Option<SmallVec<[P<ast::Item>; 1]>> {
let mut ret = SmallVec::new();
while self.p.token != token::Eof {
match panictry!(self.p.parse_item()) {
Some(item) => ret.push(item),