From f5697b1c39bc8503d1de048799727f58d5d6dea2 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 27 Feb 2016 22:31:39 -0500 Subject: [PATCH] Cleanup `Vec` initialization from `Option`. --- components/compositing/constellation.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs index 70c7f27aea5..32c8170c5a6 100644 --- a/components/compositing/constellation.rs +++ b/components/compositing/constellation.rs @@ -471,12 +471,8 @@ impl Constellation // Get an iterator for the current frame tree. Specify self.root_frame_id to // iterate the entire tree, or a specific frame id to iterate only that sub-tree. fn current_frame_tree_iter(&self, frame_id_root: Option) -> FrameTreeIterator { - let mut stack = vec!(); - if let Some(frame_id_root) = frame_id_root { - stack.push(frame_id_root); - } FrameTreeIterator { - stack: stack, + stack: frame_id_root.into_iter().collect(), pipelines: &self.pipelines, frames: &self.frames, }