From 7974c6b1a0b2d07c5a337c89a70a51e01f629778 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 9 Aug 2018 01:59:36 +0300 Subject: Mincrooptimization --- src/yellow/builder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yellow/builder.rs') diff --git a/src/yellow/builder.rs b/src/yellow/builder.rs index 70869952c..878f3ba39 100644 --- a/src/yellow/builder.rs +++ b/src/yellow/builder.rs @@ -41,11 +41,11 @@ impl<'a> Sink<'a> for GreenBuilder<'a> { fn finish_internal(&mut self) { let (kind, first_child) = self.parents.pop().unwrap(); - let children = self.children + let children: Vec<_> = self.children .drain(first_child..) .collect(); self.children.push( - GreenNode::new_branch(kind, children) + GreenNode::new_branch(kind, children.into_boxed_slice()) ); } -- cgit v1.2.3