From 9ce7e8110254e8db476c96bce2eecb2d16983159 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 31 Jul 2018 15:40:40 +0300 Subject: cleanups --- src/yellow/red.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/yellow/red.rs') diff --git a/src/yellow/red.rs b/src/yellow/red.rs index a30318c6e..c3d6c5f4f 100644 --- a/src/yellow/red.rs +++ b/src/yellow/red.rs @@ -36,7 +36,8 @@ impl RedNode { fn new(green: GreenNode, parent: Option) -> RedNode { let n_children = green.children().len(); - let children = (0..n_children).map(|_| None) + let children = (0..n_children) + .map(|_| None) .collect::>() .into_boxed_slice(); RedNode { @@ -63,7 +64,7 @@ impl RedNode { pub(crate) fn get_child(&self, idx: usize) -> Option> { if idx >= self.n_children() { - return None + return None; } match &self.children.read().unwrap()[idx] { Some(child) => return Some(child.into()), -- cgit v1.2.3