aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grammar.ron1
-rw-r--r--src/yellow/red.rs6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/grammar.ron b/src/grammar.ron
index 38453b45c..3efd60ee5 100644
--- a/src/grammar.ron
+++ b/src/grammar.ron
@@ -150,6 +150,5 @@ Grammar(
150 "LIFETIME_PARAM", 150 "LIFETIME_PARAM",
151 "TYPE_PARAM_LIST", 151 "TYPE_PARAM_LIST",
152 "TYPE_ARG_LIST", 152 "TYPE_ARG_LIST",
153
154 ] 153 ]
155) 154)
diff --git a/src/yellow/red.rs b/src/yellow/red.rs
index 8907100e4..bffb72510 100644
--- a/src/yellow/red.rs
+++ b/src/yellow/red.rs
@@ -5,7 +5,7 @@ use {yellow::GreenNode, TextUnit};
5pub(crate) struct RedNode { 5pub(crate) struct RedNode {
6 green: GreenNode, 6 green: GreenNode,
7 parent: Option<ParentData>, 7 parent: Option<ParentData>,
8 children: RwLock<Vec<Option<RedNode>>>, 8 children: RwLock<Box<[Option<RedNode>]>>,
9} 9}
10 10
11#[derive(Debug)] 11#[derive(Debug)]
@@ -36,7 +36,9 @@ impl RedNode {
36 36
37 fn new(green: GreenNode, parent: Option<ParentData>) -> RedNode { 37 fn new(green: GreenNode, parent: Option<ParentData>) -> RedNode {
38 let n_children = green.children().len(); 38 let n_children = green.children().len();
39 let children = (0..n_children).map(|_| None).collect(); 39 let children = (0..n_children).map(|_| None)
40 .collect::<Vec<_>>()
41 .into_boxed_slice();
40 RedNode { 42 RedNode {
41 green, 43 green,
42 parent, 44 parent,