diff options
author | Aleksey Kladov <[email protected]> | 2018-08-08 23:59:36 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-08 23:59:36 +0100 |
commit | 7974c6b1a0b2d07c5a337c89a70a51e01f629778 (patch) | |
tree | 7bae3e37fd6be0171789bba5f3965056649f79c5 /src/yellow/builder.rs | |
parent | f4d294f32c570a8b5494e288eae8652bc2372bb9 (diff) |
Mincrooptimization
Diffstat (limited to 'src/yellow/builder.rs')
-rw-r--r-- | src/yellow/builder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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> { | |||
41 | 41 | ||
42 | fn finish_internal(&mut self) { | 42 | fn finish_internal(&mut self) { |
43 | let (kind, first_child) = self.parents.pop().unwrap(); | 43 | let (kind, first_child) = self.parents.pop().unwrap(); |
44 | let children = self.children | 44 | let children: Vec<_> = self.children |
45 | .drain(first_child..) | 45 | .drain(first_child..) |
46 | .collect(); | 46 | .collect(); |
47 | self.children.push( | 47 | self.children.push( |
48 | GreenNode::new_branch(kind, children) | 48 | GreenNode::new_branch(kind, children.into_boxed_slice()) |
49 | ); | 49 | ); |
50 | } | 50 | } |
51 | 51 | ||