From dc1983adf7bb725a81f6f80b9d3b4a6824cb7127 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 13 May 2014 13:03:41 +0200 Subject: [PATCH] Reuse Constellation::find_all in Constellation::handle_load_iframe_url_msg. --- src/components/main/constellation.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/main/constellation.rs b/src/components/main/constellation.rs index eb1ffd26914..fcd93ee238c 100644 --- a/src/components/main/constellation.rs +++ b/src/components/main/constellation.rs @@ -549,14 +549,7 @@ impl Constellation { // or a new url entered. // Start by finding the frame trees matching the pipeline id, // and add the new pipeline to their sub frames. - let frame_trees: Vec> = { - let matching_navi_frames = self.navigation_context.find_all(source_pipeline_id); - let matching_pending_frames = self.pending_frames.iter().filter_map(|frame_change| { - frame_change.after.find(source_pipeline_id) - }); - matching_navi_frames.move_iter().chain(matching_pending_frames).collect() - }; - + let frame_trees = self.find_all(source_pipeline_id); if frame_trees.is_empty() { fail!("Constellation: source pipeline id of LoadIframeUrlMsg is not in navigation context, nor is it in a pending frame. This should be